[cairo] [poppler] Printing with poppler on Windows

Adrian Johnson ajohnson at redneon.com
Wed May 7 16:51:53 PDT 2008


Peter Åstrand wrote:
> In general, using Poppler+Freetype+Cairo+Pixman seems like a quite complex 
> combination, just for the task of printing a PDF to GDI. For example, 
> Cairo seems to have built in support for using the Win32 font system 
> instead of Freetype, but unfortunately this path is not possible with 
> Poppler, as it requires Freetype. But perhaps I'm underestimating how 
> difficult this task really is. 

Making poppler use the cairo win32 font backend would be the best 
solution but also require a lot of work. The problem with using 
poppler/cairo/freetype on win32 is that when printing all glyphs are 
emitted as filled paths. This results in large print spool files that 
are slow to print. It also loses all the font hinting.

The problem with making poppler use win32 fonts is that I don't think 
windows will accept the fonts extracted from a PDF. TrueType fonts 
should be ok although I don't whether windows will work with subsetted 
fonts. CFF fonts would need to be placed inside an OpenType wrapper. 
Type 1 fonts require the pfm file for windows to be able to use them, 
and this is not embedded in the PDF. I expect that all this could be 
made to work but it would take some effort to work out what works in 
windows and work out how to modify the embedded fonts (eg by adding 
missing tables, generating a pfm file) to get windows to load them.

There are also issues with font name collision and lifetime of fonts 
that poppler would need to resolve [1].

[1] http://blogs.msdn.com/fyuan/archive/2006/08/08/692544.aspx




More information about the cairo mailing list