Hey all,

My wife makes makes generative images (http://liaworks.com) using 
openFrameworks and exports them to PDF documents for large-format printing 
(100cm width at 300dpi). She often ends up with 10MB pdf docs containing tens 
of thousands of lines that can take between 30 minutes and 2 hours to render at 
print resolution.

To make the experience less miserable I built a progress callback into poppler. 
It's integrated into Page::displaySlice. If a progress callback is passed, 
displaySlice() does a preprocessing step where it constructs a DummyOutputDev 
and asks Gfx to render to that dev, counting the number of operations 
performed. Then it performs the real render to the passed output dev, calling 
the progress callback for every operation with a progress percent (0..1), a 
page number and optional user data.

As far as the outwards-facing parts of Poppler are concerned, I have only added 
the progress callback to the poppler::page_renderer class in the C++ API. I can 
supply a demo application built using the C++ API if that helps.

Please find the patch attached; apologies if this is not the correct way to do 
submit patches. 

Thanks (Poppler is awesome!)
Damian

Attachment: poppler-0.22.0-progressCallback.patch
Description: Binary data

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

Reply via email to