Closed jcabala14 closed 4 years ago
try adding charset in the document's meta tags:
"
<meta charset=\"utf-8\">Spanish text...
"On Mon, Aug 26, 2019 at 1:07 PM Jorge Cabal notifications@github.com wrote:
Hello!
When I try to generate a PDF from directly HTML, PDF lost encoding from HTML. The HTML has the encoding introduced in UTF-8 into head at tag, and into the code with the defaultEncoding method from htmltopdf.
HtmlToPdf.create( .object(HtmlToPdfObject.forHtml("
This is the second object...
").defaultEncoding("utf-8)).convert();The encoding used is UTF-8 because the generated pdf is in spanish.
Is an issue? How to keep html encoding in pdf?
Thanks!
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/wooio/htmltopdf-java/issues/31?email_source=notifications&email_token=AA4DXURD7EFXQURE4Z75ZFLQGOTOXA5CNFSM4IPOB2GKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HHK5EZQ, or mute the thread https://github.com/notifications/unsubscribe-auth/AA4DXUWVFFHITSK45BEJEEDQGOTOXANCNFSM4IPOB2GA .
-- בן ברקאי
Hi @benbarkay,
I tryed use this tags:
<meta charset="UTF-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
And both at the same time, but result is the same. Is strictly necesary add backslash at charset like your comment?
Best regards.
See #32 if this is still a problem.
Hello!
When I try to generate a PDF from directly HTML, PDF lost encoding from HTML. The HTML has the encoding introduced in UTF-8 into head at tag, and into the code with the defaultEncoding method from htmltopdf.
The encoding used is UTF-8 because the generated pdf is in spanish.
Is an issue? How to keep html encoding in pdf?
Thanks!