[poppler] Printing with poppler on Windows
domlachowicz at gmail.com
Wed Feb 6 07:00:58 PST 2008
Both the Glib and Qt backends can render directly to GDI.
If you know a little C code, it shouldn't be too hard to:
1) Get the Windows default printer's HDC. See UT_GetDefaultPrinterDC()
in AbiWord's code  for how to do that.
2) Create a cairo printing surface for it 
3) Load a PopplerDocument using poppler_document_new_from_file()
4) For each PopplerPage in the document, poppler_page_render_for_printing()
On Feb 6, 2008 9:17 AM, Peter Åstrand <astrand at cendio.se> wrote:
> I'd like to do the equivalent of "pdftops foo.pdf | lpr" in Windows. That
> is, print foo.pdf on the default printer. I like poppler and would love to
> use it for this task, if possible. But as I understand it, no such tool is
> yet included? Perhaps poppler doesn't even support rendering to GDI at the
> I've found http://blog.kowalczyk.info/software/sumatrapdf/, and it
> can be invoked with "-print-to-default". However:
> * It does not use the normal poppler library, but rather a fork (and in
> newer versions "mupdf" instead).
> * It's a GUI application. I'd like a command line one.
> * Lots of code. I'd like something small and simple.
> Any ideas?
> Best regards,
> Peter Åstrand ThinLinc Chief Developer
> Cendio AB http://www.cendio.se
> Wallenbergs gata 4
> 583 30 Linköping Phone: +46-13-21 46 00
> poppler mailing list
> poppler at lists.freedesktop.org
Counting bodies like sheep to the rhythm of the war drums.
More information about the poppler