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
(Moved from svg2pdf.js issue 190 tracker, as it is happens to be unrelated to the SVG layer.)
Using an added unicode font in SVG results in broken PDF. There are no warnings or errors logged in the console.
On Windows, Adobe Reader says "There as an error processing a page. There as a problem reading this document (135)". Sumatra displays a blank page or unrelated characters in an unrelated font (pdf default serif?).
On macOS Big Sur 11.5.2, "Preview" displays a blank page.
Various PDF tools report problems with the file. E.g.
pdfunite : "Syntax Error: Dictionary key must be a name object"
mutool : "error: invalid key in dict"
gs -sDEVICE=pdfwrite : "Error: obj definition followed by multiple tokens"
etc.
However, the PDF renders correctly with anything Poppler-based on Linux or with PDF readers built into Firefox or Chrome browsers.
The UMD "LiberationSans-Bold-bold.js" (LiberationSans-Bold-bold.js.zip attached) was generated with jsPDF fontconverter tool from a TTF coming with default Xubuntu installation. The behaviour is the same with Free Sans, or Noto Sans fonts.
The behaviour is the same with other PDF page sizes.
If an additional font is not loaded, or when using default fonts, the PDF renders just fine.
I've just figured out why it fails: there is a space in the font name. This issue has been fixed already in #3149 and there will be a new release within the next days.
Description
(Moved from svg2pdf.js issue 190 tracker, as it is happens to be unrelated to the SVG layer.)
Using an added unicode font in SVG results in broken PDF. There are no warnings or errors logged in the console.
On Windows, Adobe Reader says "There as an error processing a page. There as a problem reading this document (135)". Sumatra displays a blank page or unrelated characters in an unrelated font (pdf default serif?).
On macOS Big Sur 11.5.2, "Preview" displays a blank page.
Various PDF tools report problems with the file. E.g.
pdfunite : "Syntax Error: Dictionary key must be a name object"
mutool : "error: invalid key in dict"
gs -sDEVICE=pdfwrite : "Error: obj definition followed by multiple tokens"
etc.
However, the PDF renders correctly with anything Poppler-based on Linux or with PDF readers built into Firefox or Chrome browsers.
Using version jspdf.umd.js : 2.3.1
To reproduce
HTML
asypdf-bare.js
The UMD "LiberationSans-Bold-bold.js" (LiberationSans-Bold-bold.js.zip attached) was generated with jsPDF fontconverter tool from a TTF coming with default Xubuntu installation. The behaviour is the same with Free Sans, or Noto Sans fonts.
The behaviour is the same with other PDF page sizes.
If an additional font is not loaded, or when using default fonts, the PDF renders just fine.
Platform
The text was updated successfully, but these errors were encountered: