[poppler] poppler/qt4/src: poppler-document.cc, 1.34, 1.35 poppler-qt4.h, 1.47, 1.48

Albert Astals Cid aacid at kemper.freedesktop.org
Fri Apr 27 14:25:33 PDT 2007


Update of /cvs/poppler/poppler/qt4/src
In directory kemper:/tmp/cvs-serv368/qt4/src

Modified Files:
	poppler-document.cc poppler-qt4.h 
Log Message:
        * glib/poppler-page.cc:
        * poppler/PSOutputDev.cc:
        * poppler/PSOutputDev.h:
        * qt/poppler-document.cc:
        * qt4/src/poppler-document.cc:
        * qt4/src/poppler-qt4.h:
        * utils/pdftohtml.cc:
        * utils/pdftops.cc:
        Add option to force rasterizing the pages when printing them
        Add functionality to output the title field on the PS file
        Only Qt4 frontend exposes the functionality

Bringing this features from KPDF 3.5.7 to poppler
Testers welcome
Patches for other frontends more than welcome
Comments and suggestions even more than welcome :-)


Index: poppler-document.cc
===================================================================
RCS file: /cvs/poppler/poppler/qt4/src/poppler-document.cc,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- poppler-document.cc	25 Apr 2007 21:25:06 -0000	1.34
+++ poppler-document.cc	27 Apr 2007 21:25:30 -0000	1.35
@@ -414,9 +414,14 @@
         return ld;
     }
     
-    bool Document::print(const QString &file, const QList<int> &pageList, double hDPI, double vDPI, int rotate, int paperWidth, int paperHeight, int marginRight, int marginBottom, int marginLeft, int marginTop, bool strictMargins)
+    bool Document::print(const QString &file, const QString &title, const QList<int> &pageList, double hDPI, double vDPI, int rotate, int paperWidth, int paperHeight, int marginRight, int marginBottom, int marginLeft, int marginTop, bool strictMargins, bool forceRasterize)
     {
-        PSOutputDev *psOut = new PSOutputDev(file.toLatin1().data(), m_doc->doc->getXRef(), m_doc->doc->getCatalog(), 1, m_doc->doc->getNumPages(), psModePS, paperWidth, paperHeight, gFalse, marginRight, marginBottom, paperWidth - marginLeft, paperHeight - marginTop);
+        QByteArray pstitle8Bit = title.toLocal8Bit();
+        char* pstitlechar;
+        if (!title.isEmpty()) pstitlechar = pstitle8Bit.data();
+        else pstitlechar = 0;
+
+        PSOutputDev *psOut = new PSOutputDev(file.toLatin1().data(), m_doc->doc->getXRef(), m_doc->doc->getCatalog(), pstitlechar, 1, m_doc->doc->getNumPages(), psModePS, paperWidth, paperHeight, gFalse, marginRight, marginBottom, paperWidth - marginLeft, paperHeight - marginTop, forceRasterize);
 
         if (strictMargins)
         {

Index: poppler-qt4.h
===================================================================
RCS file: /cvs/poppler/poppler/qt4/src/poppler-qt4.h,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -d -r1.47 -r1.48
--- poppler-qt4.h	24 Feb 2007 23:58:31 -0000	1.47
+++ poppler-qt4.h	27 Apr 2007 21:25:30 -0000	1.48
@@ -729,7 +729,7 @@
 height = dummy.height();
 	  \endcode
 	*/
-	bool print(const QString &fileName, const QList<int> &pageList, double hDPI, double vDPI, int rotate, int paperWidth, int paperHeight, int marginRight, int marginBottom, int marginLeft, int marginTop, bool strictMargins);
+	bool print(const QString &fileName, const QString &title, const QList<int> &pageList, double hDPI, double vDPI, int rotate, int paperWidth, int paperHeight, int marginRight, int marginBottom, int marginLeft, int marginTop, bool strictMargins, bool forceRasterize);
 	
 	/**
 	  Sets the paper color



More information about the poppler mailing list