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

CFDocument(PDF) - Fonts

New Here ,
Mar 26, 2013 Mar 26, 2013

Copy link to clipboard

Copied

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 @Font-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#" />

TOPICS
Advanced techniques

Views

971

Translate

Translate

Report

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
LEGEND ,
Mar 26, 2013 Mar 26, 2013

Copy link to clipboard

Copied

Why are you using cffile instead of cfdocument or cfpdf?

Votes

Translate

Translate

Report

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 26, 2013 Mar 26, 2013

Copy link to clipboard

Copied

LATEST

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#" />

Votes

Translate

Translate

Report

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
Documentation