Skip to main content
Participating Frequently
November 3, 2022
Question

CFHTMLTOPDF requires to force charset with Colfusion2021

  • November 3, 2022
  • 1 reply
  • 915 views

I was using cfhtmltopdf with coldfusion11

 

After migration to coldfusion2021, I need to update my code to force charset otherwise special characters are no more displayed.

 

Just adding  <meta charset="iso-8859-1"> at the beginning of html code to be converted to pdf.

 

Is there any configuration to be done in jetty or coldfusion jvm to avoid such modification ?

    This topic has been closed for replies.

    1 reply

    BKBK
    Community Expert
    Community Expert
    November 6, 2022

    Do the following:

    1.  Remove the charset meta tag from cfhtmltopdf;
    2.  Open /bin/jvm.config in a text editor and add -Dfile.encoding=UTF8 to the java.args variable;
    3.  Restart ColdFusion 2021.

     

     

    Participating Frequently
    November 7, 2022

    Thank you BKBK but it doesn't work. I have tried several -Dfile.encoding but with no result.

    BKBK
    Community Expert
    Community Expert
    November 7, 2022

    It should work. Please share the code of CFM page containing cfhtmltopdf. We can then test it.