Commit 8f0c595d authored by Albert Astals Cid's avatar Albert Astals Cid

Use pagesize with double values to divide, if not the rounding up and down and...

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
parent 690bfc74
......@@ -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 )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment