0

I installed Helvetica Neue Thin in Fontmanagement of Coldfusion 2016 (64-Bit). The installation havn't any error, but the font doesn't display in PDF. I have Barcode font, which installed and work perfectly. The Question is : Need the Font special license to display it on Webpages? if yes, how Barcode Font work perfectly (without any special license).

zani
  • 88
  • 9
  • You need to add the font in coldfusion administrator to use it on PDF. If you are using paid font then you should buy a license. See the link for more details https://www.cfguide.io/coldfusion-administrator/server-settings-font-management/ – Keshav jha Apr 25 '18 at 17:11
  • Zani, can you clarify if your problem was ever resolved? Was the font in the CF Admin, as Keshav suggested? Or did you perhaps try the cfhtmltopdf as James was getting at in his comment? And if neither worked and the problem remained, were you indeed using cfdocument? – charlie arehart Jun 10 '20 at 20:04

1 Answers1

0

Which version of ColdFusion?

Are you sure that "Helvetica Neue Thin" is the system name of the font? (We've had some issues where the system font name is slightly different.)

Is it TrueType? (We've had the best success using TrueType with CFDocument.)

Try this CFML (from Tim Cunningham) to expose system font information:

<cfset adminObj = createObject("Component", "cfide.adminapi.administrator")>
<cfset adminObj.login("yourpass")> <!--- change to use your CF Admin password --->
<cfset rtService = createObject("component", "cfide.adminapi.runtime")>
<cfset fonts = rtService.getFonts()>
<cfdump var="#fonts#">

If the font is still not embedded, I believe it could be due to a licensing issue where the font can't be embedded.

SIDE NOTE: For the past couple years, I've been performing all ColdFusion 8-2016 PDF generation using the command line and WKHTMLTOPDF. WKHTMLTOPDF understands newer CSS3 (page-break-inside, page-break-before, fontawesome) & HTML5 specifications, SVG and renders javascript & webfonts! This means you can easily use any font without ever having to install it on the server. There are a couple of ColdFusion tags that make WKTHMLTOPDF easier to use. I've also blogged about WKHTMLTOPDF & ColdFusion.

James Moberg
  • 4,360
  • 1
  • 22
  • 21