[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdegraphics/okular/generators/poppler
From:       Albert Astals Cid <tsdgeos () terra ! es>
Date:       2007-12-07 19:17:55
Message-ID: 1197055075.084008.20809.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 746081 by aacid:

Use pagesize with double values to divide, if not the rounding up and down and \
                whatnow hits us and we get a page of the different size we wanted.
BUG: 153621


 M  +4 -3      generator_pdf.cpp  


--- trunk/KDE/kdegraphics/okular/generators/poppler/generator_pdf.cpp #746080:746081
@@ -1703,9 +1703,6 @@
     if ( page->rotation() % 2 )
         qSwap( pageWidth, pageHeight );
 
-    double fakeDpiX = width * 72.0 / pageWidth,
-           fakeDpiY = height * 72.0 / pageHeight;
-
     // setup Okular:: output device: text page is generated only if we are at 72dpi.
     // since we can pre-generate the TextPage at the right res.. why not?
     bool genTextPage = !page->hasTextPage() &&
@@ -1720,7 +1717,11 @@
 
     // 1. set OutputDev parameters and Generate contents
     Poppler::Page *pp = d->generator->pdfdoc->page( page->number() );
+    const QSizeF &pageSizeF = pp->pageSizeF();
     
+    double fakeDpiX = width * 72.0 / pageSizeF.width(),
+           fakeDpiY = height * 72.0 / pageSizeF.height();
+
     // 2. grab data from the OutputDev and store it locally (note takeIMAGE)
 #ifndef NDEBUG
     if ( d->m_image )


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic