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

cfhtmltopdf and cfhtmltopdfitem font

Explorer ,
Mar 23, 2017 Mar 23, 2017

Copy link to clipboard

Copied

The HTML used to generate a PDF has a reference to the CSS style with font-family Garamond and it is not coming out as the font.

Then the Footer added via cfhtmltopdfitem seems to be one font and one only.  Meaning, as a programmer I seem to have no control over the outputed font of the text in the footer cfhtmltopdfitem.

Is there something in the jetty engine that can be done to correct this?  We are running CF 11 update 11.  I have installed/confirmed installed the Garamond font is showing in the font management via the CF Admin screens as well.

any suggestions are welcome but to use another PDF engine is not an option.  One would expect control over the output of PDF typeface in any system to generate a PDF.

Please advise.

Views

1.1K

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
Advocate ,
Mar 24, 2017 Mar 24, 2017

Copy link to clipboard

Copied

Its rubbish basically. I started using another wkhtmltopdf instead. The limitation however are documented for these cfhtmltopdfitem tags

This tag supports very limited HTML in its body. This tag only supports these 5 HTML tags: <body>, <p>, <i>, <b> and <span>.

What does your html look like for the footer? i.e. a <div> wont work.

cfhtmltopdf is built on the adobe pdf engine, which seems to lack a lot of things when it comes to headers and footers.

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
Explorer ,
Mar 24, 2017 Mar 24, 2017

Copy link to clipboard

Copied

LATEST

Yes, I did know about the limited HTML tags as you stated per the documentation.

BUT I had not tried to add the <span> tag in the footer item to specify the font with an inline style attribute.  Not sure why I did not think of it but that is why I posted to question in the first place any idea or other developer comments sparks ideas.

SO thank you for that.  The HTML that I have in the other item is in a table.  So I will be attempting to wrap the elements with the <span> tags to see if that does the trick.

The HTML that I have in the other item is within a table - helps with the layout.  So I will be attempting to wrap the elements with the <span> tags to see if that does the trick.

I will mark your post as my solution if it all works out when I circle back to looking at this again.

Again thank you for commenting.

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