[poppler] Loading a page as image using qt-poppler

Bogdan Cristea cristeab at gmail.com
Sat Dec 17 00:58:06 PST 2011


Hi

I have wrote a PDF reader in Qt using poppler. Now I am trying to
optimize the time needed when switching pages. In order to do so the
pages to be displayed are loaded in advance in a separate thread using
the following code:

doc_->page(page)
                      ->renderToImage(scaleFactor_ * physicalDpiX_,
                                      scaleFactor_ * physicalDpiY_)

Thus the pages are stored in memory in a QImage buffer before beeing displayed.
However, I have noticed that when the page is loaded with the above
code the entire GUI is blocked as if the disk access operation is made
by the GUI thread. My question is what are the alternative methods
needed in order to load the PDF document image in background, without
affecting the GUI thread?

thanks
-- 
Bogdan Cristea


More information about the poppler mailing list