-1

We have a system in coldfusion using cfhtmltopdf to generate reports in pdf. The html of all reports are generated with the

  < meta charset="iso-8859-1">

It was working well until we install the update 8 on it. Now all the variables come from database has the acentuation bugged.

A "É" is showed like a "Ã%°" A "Â" is showed like a "Ã,"

To fix the accentuation in the pdf just using encodeForHTML in each variable, and it's an impossible job, some reports have 200 variables from database.

Yargo.ar
  • 83
  • 10
  • What exactly do you mean by "bugged"? Can you post a *small* repro case that demonstrates the issue? – Leigh May 19 '16 at 19:11
  • A "É" is showed like a "Ã%°" A "Â" is showed like a "Ã," – Yargo.ar May 19 '16 at 19:16
  • If it's a bug, *report it*. – jonrsharpe May 19 '16 at 19:17
  • 1
    Could you provide a vanilla HTML sample (w/DOCTYPE) that illustrates the problem? Save the document as plain text to SO or Github/gist. (I'd like to test & compare results using CF9/10/11/2016 & WKHTMLTOPDF.) – James Moberg May 20 '16 at 00:35
  • 1
    CFDocument had a "pageencoding" parameter that can force a character set. CFHTMLTOPDF doesn't have that option. Is your HTML inline or are you using the "source" attribute? If you generated & saved the HTML, did you use charset="iso-8859-1" when saving it? Please provide more info regarding the HTML & CF code you are using. – James Moberg May 20 '16 at 01:31

1 Answers1

0

Did you try cfprocessingdirective?

 <cfprocessingdirective pageEncoding = "iso-8859-1">

 </cfprocessingdirective>
Xavier L.
  • 368
  • 1
  • 11
  • I thought about that too, but didn't think it was a necessary hoop to jump through. Is this required and does it work? If so, it should be added to all existing documentation regarding both CFDocument & CFHTMLTOPDF. – James Moberg May 20 '16 at 19:43