Monday, 9 February 2009

CFDOCUMENT Font Issues - Type 1

This has been reported many times but there are a number of issues with CFDOCUMENT and embedding fonts in PDFs - in particular in MX7. One client required a PDF to use the Dax font and had initially provided Type 1 fonts, these of courses didn't work as ColdFusion didn't recognise them. TrueType TTF fonts were then provided but still didn't work despite the fonts being installed in the system fonts folder and being correctly referenced by the font family name in the page CSS.

The core issue is that CFDOCUMENT will attempt to use the first version of a font with a matching font-family name - regardless of it's type. Our system had Type 1 and TrueType versions of Dax installed but CFDOCUMENT always tried to use the Type 1 version. The only way to resolve the issue was to completely remove the Type 1 version, the output now works perfectly!

No comments: