Skip to main content
Legend
August 6, 2012
Question

CF 10 CFDocument Fonts not Rendering

  • August 6, 2012
  • 3 replies
  • 2350 views

We're building some new servers with CF 10 Enterprise and we cannot get the CFDocument tag to render fonts properly.  It seems to have picked a select few that it will use and refuses to use any others.  For example, it will use Arial and Times New Roman but it steadfastly refuses to use Helvetica and TradeGothic.  WTF?

Yes, the server has those fonts installed and they show up in CFAdmin (see screenshot, below).

Of all the TradeGothics listed above, the TrueTypes get completely ignored.  The OpenTypes cause CF to crash with this error:

coldfusion.document.spi.DocumentExportException: java.lang.NullPointerException

Fontembed is set to YES.  Looking at the PDF properties and TradeGothic are not embeded in it so CF would seem to be the culprit.

We have changed nothing in our CF code as we've moved it from CF8 to CF9 and now to CF10.  CF8 and 9 used these fonts with no problem.  What's up with 10?

Ideas?

This topic has been closed for replies.

3 replies

freds47453514
Participant
March 23, 2019

Had a similar problem rendering custom fonts in Coldfusion include templates. The fix for me was to nest the custom font rendering between cfoutput tags.  Worked like a charm after that.

Cheers

Inspiring
May 22, 2015

Same problem here - installed some OTF fonts and cfdocument PDF generation is failing with the NullPointerException as described by the OP.

Running CF 10 HF 15 / Java 1.8.45 / Windows Server 2012

Worked around it by converting the OTF fonts to TTF using FontForge.  Thanks to https://webmonkeyswithlaserbeams.wordpress.com/2009/04/29/custom-fonts-in-coldfusion for the tip.

Inspiring
September 18, 2013

bumping this... got the same problem still over a year later.