Thursday, 29 April 2010

PoDoFo Base 14 Font support

Today has seen a major contribution to the PoDoFo PDF library.

I integrated a patch by Ian Curington and his developers, which brings support for using the base 14 fonts in PDF files. What are the base 14 fonts, you might ask?

Every PDF viewer has to ship with these 14 fonts, therefore one can achieve much smaller file sizes, as these particular 14 fonts do not have to be embedded into the PDF. Still, the PDF is displayed the same on every system (should be displayed ...), as every PDF viewer has the same font metrics for these fonts. Among the base 14 fonts are Helvetica, Times, Courier and Symbol.

This contribution makes the base 14 fonts available to everyone creating PDFs using PoDoFo. As the base 14 fonts are automatically used, whenever you request a PdfFont like Helvetica, this should result in much smaller file sizes for PDFs created with PoDoFo, which only use these fonts. An example which does also compare one of the base 14 fonts (Helvetica) to a TrueType font (Arial) is also provided. Okular has some problem displaying the symbol fonts, which I have yet to investigate.

If you would like to try the change, please grab the latest PoDoFo from SVN. The change is not included in the latest 0.8.0 release.

5 comments:

家祥皇雯 said...

謝謝您的分享~感恩唷!!..................................................

芳瑜 said...

很喜歡你的部落格風格,期待你的更新!........................................

韋于倫成 said...

快樂是你與生俱來的權力,它不應該取決於你完成什麼。 ..................................................

韋于倫成 said...

一沙一世界,一花一天堂,掌中握無限,剎那即永恆..................................................

uknowme said...

Every PDF viewer has to ship with these 14 fonts, therefore one can achieve much smaller file sizes, as these particular 14 fonts do not have to be embedded into the PDF. Still, the PDF is displayed the same on every system (should be displayed ...), as every PDF viewer has the same font metrics for these fonts. Among the base 14 fonts are Helvetica, Times, Courier and Symbol.
manufacturing business software

classifieds for free