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

Modified Files:
        poppler-document.cc poppler-qt4.h 
Log Message:
Ask for paper size width and height to pass it to PSOutputDev in both qt 
frontends (qt got abi mantained, qt4 changed as you still have to define 
UNSTABLE_POPPLER_QT4 to be able of using it, one day we'll have to think of 
removing it)


Index: poppler-document.cc
===================================================================
RCS file: /cvs/poppler/poppler/qt4/src/poppler-document.cc,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- poppler-document.cc 13 May 2006 15:58:39 -0000      1.20
+++ poppler-document.cc 25 Jun 2006 16:59:31 -0000      1.21
@@ -395,9 +395,9 @@
         return ld;
     }
     
-    bool Document::print(const QString &file, const QList<int> pageList, 
double hDPI, double vDPI, int rotate)
+    bool Document::print(const QString &file, const QList<int> pageList, 
double hDPI, double vDPI, int rotate, int paperWidth, int paperHeight)
     {
-        PSOutputDev *psOut = new PSOutputDev(file.toLatin1().data(), 
m_doc->doc.getXRef(), m_doc->doc.getCatalog(), 1, m_doc->doc.getNumPages(), 
psModePS);
+        PSOutputDev *psOut = new PSOutputDev(file.toLatin1().data(), 
m_doc->doc.getXRef(), m_doc->doc.getCatalog(), 1, m_doc->doc.getNumPages(), 
psModePS, paperWidth, paperHeight);
 
         if (psOut->isOk())
         {

Index: poppler-qt4.h
===================================================================
RCS file: /cvs/poppler/poppler/qt4/src/poppler-qt4.h,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- poppler-qt4.h       1 Jun 2006 21:03:38 -0000       1.33
+++ poppler-qt4.h       25 Jun 2006 16:59:31 -0000      1.34
@@ -682,7 +682,15 @@
        
        LinkDestination *linkDestination( const QString &name );
        
-       bool print(const QString &fileName, const QList<int> pageList, double 
hDPI, double vDPI, int rotate);
+       /**
+         If you are using QPrinter you can get paper size by doing
+         QPrinter dummy(QPrinter::PrinterResolution);
+         dummy.setFullPage(true);
+         dummy.setPageSize(myPageSize);
+         width = dummy.width();
+         height = dummy.height();
+       */
+       bool print(const QString &fileName, const QList<int> pageList, double 
hDPI, double vDPI, int rotate, int paperWidth, int paperHeight);
        
        /**
          Sets the paper color, if not set it is white by default.

_______________________________________________
poppler mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/poppler

Reply via email to