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

svn path=/trunk/KDE/kdegraphics/okular/; revision=746081
remotes/origin/KDE/4.0
Albert Astals Cid 19 years ago
parent 690bfc7456
commit 8f0c595dfd
  1. 7
      generators/poppler/generator_pdf.cpp

@ -1703,9 +1703,6 @@ void PDFPixmapGeneratorThread::run()
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 @@ void PDFPixmapGeneratorThread::run()
// 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 )

Loading…
Cancel
Save