You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I have a document with a named page with just one image tag, then the fonts break in the document, e.g. it displays a series of numbers of symbols, on Google Chrome PDF viewer only.
The bug occurs in Google Chrome only, under V65 (but also on previous versions V64). pdf.js e.g. in Firefox and Adobe Acrobat displays the text correctly. The bug occurs when a PDF is generated by WeasyPrint, if I re-save it in another application (e.g. Apple Preview), the document displays the correct text again.
The text was updated successfully, but these errors were encountered:
Until Chrome developers fix the bug, the known possibilities are:
to disable the "Make the text in PDF images interactable" flag in Chrome, or
to transform WeasyPrint’s PDF into another PDF with a third-party library such as Ghostscript (using gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=out.pdf in.pdf for example) or Apple Preview that you proposed.
As we don’t know where this bug comes from, the second solution may not work in some cases. I suppose (but I’m not sure) that it comes from the ToUnicode table that we always use in WeasyPrint, while other tools tend to use one of the default PDF encodings.
When I have a document with a named page with just one image tag, then the fonts break in the document, e.g. it displays a series of numbers of symbols, on Google Chrome PDF viewer only.
Example HTML [broken]:
When I add one more tag to the container with the image, then it works:
Example HTML [working]:
The bug occurs in Google Chrome only, under V65 (but also on previous versions V64). pdf.js e.g. in Firefox and Adobe Acrobat displays the text correctly. The bug occurs when a PDF is generated by WeasyPrint, if I re-save it in another application (e.g. Apple Preview), the document displays the correct text again.
The text was updated successfully, but these errors were encountered: