Skip to main content
Participant
March 26, 2013
Question

CFDocument(PDF) - Fonts

  • March 26, 2013
  • 1 reply
  • 1081 views

CFDocument does not render my fonts in the PDF

I tried the following things:

  • Add the Font in the CFAdmin(.ttf)
  • Try to use the <font> - Tag instead of CSS
  • Add the Font via @11220649-face in CSS

I use Coldfusion 9 on Linux

Here is the code, which i use to generate my PDF

  <CFFILE action="write" file="mydocument.pdf" output="#content#" mode="777" />

  <cfheader name="Content-Disposition" value="attachment; filename=mydocument.pdf">

  <cfcontent type="application/pdf" variable="#content#" />

This topic has been closed for replies.

1 reply

Inspiring
March 26, 2013

Why are you using cffile instead of cfdocument or cfpdf?

sircromAuthor
Participant
March 26, 2013

That's only a intermediate step to save my pdf on the server.

My Codeorder looks like this:

<CFDOCUMENT name="content" format="pdf" pageType="A4" localurl="yes" fontembed="no" marginbottom="0" margintop="1" unit="cm">

     <!--- MY HTML --->

</CFDOCUMENT>

<CFFILE action="write" file="mydocument.pdf" output="#content#" mode="777" />

<cfheader name="Content-Disposition" value="attachment; filename=mydocument.pdf">

<cfcontent type="application/pdf" variable="#content#" />