diff --git a/generators/xpdf/Makefile.am b/generators/xpdf/Makefile.am index c949fca40..f1177a862 100644 --- a/generators/xpdf/Makefile.am +++ b/generators/xpdf/Makefile.am @@ -5,7 +5,9 @@ kde_module_LTLIBRARIES = \ INCLUDES = -I$(srcdir)/../.. -I$(srcdir)/xpdf -I$(srcdir)/xpdf/goo -I$(srcdir)/xpdf/splash -I$(top_builddir)/kpdf $(all_includes) -libokularGenerator_xpdf_la_LIBADD = $(top_builddir)/kpdf/core/libkpdfcore.la $(top_builddir)/kpdf/conf/libkpdfconf.la $(top_builddir)/kpdf/generators/xpdf/xpdf/xpdf/libxpdf.la -lkdeui -lkdeprint +libokularGenerator_xpdf_la_LIBADD = $(top_builddir)/kpdf/core/libkpdfcore.la $(top_builddir)/kpdf/conf/libkpdfconf.la \ + $(top_builddir)/kpdf/generators/xpdf/xpdf/xpdf/libxpdf.la \ + $(LIB_KDEPRINT) $(LIB_KDEUI) libokularGenerator_xpdf_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) libokularGenerator_xpdf_la_SOURCES = generator_pdf.cpp gp_outputdev.cpp diff --git a/generators/xpdf/generator_pdf.cpp b/generators/xpdf/generator_pdf.cpp index 72886138b..3ae18f7ce 100644 --- a/generators/xpdf/generator_pdf.cpp +++ b/generators/xpdf/generator_pdf.cpp @@ -233,7 +233,7 @@ TextPage * PDFGenerator::fastTextPage (KPDFPage * page) // fetch ourselves a textpage KPDFTextDev td; docLock.lock(); - pdfdoc->displayPage( &td, page->number()+1, 72, 72, 0, true, false ); + pdfdoc->displayPage( &td, page->number()+1, 72, 72, page->rotation(), true, false ); TextPage * textPage = td.takeTextPage(); docLock.unlock(); return textPage; @@ -492,7 +492,7 @@ void PDFGenerator::generatePixmap( PixmapRequest * request ) // 1. Set OutputDev parameters and Generate contents // note: thread safety is set on 'false' for the GUI (this) thread kpdfOutputDev->setParams( request->width, request->height, genTextPage, genObjectRects, genObjectRects, false ); - pdfdoc->displayPage( kpdfOutputDev, page->number() + 1, fakeDpiX, fakeDpiY, 0, true, genObjectRects ); + pdfdoc->displayPage( kpdfOutputDev, page->number() + 1, fakeDpiX, fakeDpiY, page->rotation(), true, genObjectRects ); // 2. Take data from outputdev and attach it to the Page page->setPixmap( request->id, kpdfOutputDev->takePixmap() ); @@ -521,7 +521,7 @@ void PDFGenerator::generateSyncTextPage( KPDFPage * page ) // build a TextPage using the lightweight KPDFTextDev generator.. KPDFTextDev td; docLock.lock(); - pdfdoc->displayPage( &td, page->number()+1, 72, 72, 0, true, false ); + pdfdoc->displayPage( &td, page->number()+1, 72, 72, page->rotation(), true, false ); // ..and attach it to the page page->setSearchPage( abstractTextPage(td.takeTextPage(), page->height(), page->width()) ); docLock.unlock(); diff --git a/generators/xpdf/generator_pdf.h b/generators/xpdf/generator_pdf.h index 96cbd9d9f..020954c28 100644 --- a/generators/xpdf/generator_pdf.h +++ b/generators/xpdf/generator_pdf.h @@ -67,6 +67,11 @@ class PDFGenerator : public Generator void generatePixmap( PixmapRequest * request ); bool canGenerateTextPage(); void generateSyncTextPage( KPDFPage * page ); + + // bah + QString getXMLFile() { return QString::null; }; + void setupGUI(KActionCollection * /*ac*/ , QToolBox * /* tBox */) { ; }; + bool supportsSearching() { return true; }; bool supportsRotation() { return true; }; bool prefersInternalSearching() { return false; };