- comment out textpage genration on loading of document (takes too much time, need a different way)

- port to new generator API/desktop

svn path=/trunk/playground/graphics/oKular/kpdf/; revision=445382
remotes/origin/okular3-playground
Piotr Szymanski 21 years ago
parent c5b853601e
commit 83a91ddbe9
  1. 7
      generators/xpdf/generator_pdf.cpp
  2. 2
      generators/xpdf/generator_pdf.h
  3. 3
      generators/xpdf/libokularGenerator_xpdf.desktop

@ -214,12 +214,13 @@ void PDFGenerator::loadPages(QValueVector<KPDFPage*> & pagesVector, int rotation
if ( true ) //TODO real check
addAnnotations( p, page );
docLock.lock();
// need a way to find efficient (maybe background textpage generation)
/* docLock.lock();
pdfdoc->displayPage( &td, page->number()+1, 72, 72, rotation, true, false );
TextPage * textPage = td.takeTextPage();
docLock.unlock();
page->setSearchPage(abstractTextPage(textPage,page->height(),page->width()));
page->setSearchPage(abstractTextPage(textPage,page->height(),page->width()));*/
if (clear && pagesVector[i])
delete pagesVector[i];
@ -447,7 +448,7 @@ bool PDFGenerator::isAllowed( int permissions )
return b;
}
bool PDFGenerator::canGeneratePixmap()
bool PDFGenerator::canGeneratePixmap( bool /* async */)
{
return ready;
}

@ -63,7 +63,7 @@ class PDFGenerator : public Generator
bool isAllowed( int permissions );
// [INHERITED] perform actions on document / pages
bool canGeneratePixmap();
bool canGeneratePixmap( bool async );
void generatePixmap( PixmapRequest * request );
bool canGenerateTextPage();
void generateSyncTextPage( KPDFPage * page );

@ -1,10 +1,11 @@
[Desktop Entry]
Encoding=UTF-8
Type=Service
Name=PDF Generator (xpdf)
Name=Xpdf
Comment=PDF backend for oKular using xpdf
ServiceTypes=oKular/Generator
MimeType=application/x-pdf;application/pdf
X-KDE-Library=libokularGenerator_xpdf.la
X-KDE-Priority=1
X-KDE-oKularAPIVersion=1
X-KDE-oKularHasInternalSettings=false

Loading…
Cancel
Save