Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

CF 10 CFDocument Fonts not Rendering

Engaged ,
Aug 06, 2012 Aug 06, 2012

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).

tradegothic.PNG

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?

2.3K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 17, 2013 Sep 17, 2013

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
May 21, 2015 May 21, 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 22, 2019 Mar 22, 2019
LATEST

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources