parallax / jsPDF

Client-side JavaScript PDF generation for everyone.

Home Page:https://parall.ax/products/jspdf

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

symbols not read by jsPDF

MROVIC opened this issue · comments

I found issues with some html entities (or am I wrong?)

In jsPDF here are just few symbols/chars that don't work, in my case:
≥ (Greater-Than or Equal To) : no way found;
≤ (Less-Than or Equal To) : no way found;
∼ (Tilde Operator) : it can be read as char or ASCII (not as html entity) .

For the above I tried the standard char, ASCII, html entity, html and hex codes:
≥ : is rendered as : "e
≤ : is rendered as : "d
∼ : is rendered as : "< (if in html is written as entity or code)

They're important: I need them because my tables are chemical specification sheets and limit values must be expressed with these symbols.
Any suggestion please? Thank you.

The symbols are in fonts used as standard in jsPDF, so I don't understand why they aren't rendered (thanks for help).
symbols_in_fonts

Actually jsPDF 2.5.1 readme.md says:
" The 14 standard fonts in PDF are limited to the ASCII-codepage. ", and actually "Greater-Than Or Equal To" and "Less-Than Or Equal To" are NOT included in ASCII table.
But:

  1. the issue affects also the "Tilde Operator", which is in ASCII (read as ASCCI and not html entity)
  2. if only ASCII, why for the other symbols jsPDF reads hex, html entity, all?
    These are my questions.
    Given the case, I guess that my only solution is to add base64 for the missing symbols.
    But if someone can suggest me a better solution, welcome with thanks !

nobody replies here: I minimized a "calibri" font to the strictly necessary and added a second font as base64 to have those symbols) (the other font which I needed to add is Chinese, 10 mb).
Only way, because the jsPDF standard are based on ASCII, i.e. they miss some symbol ... for me this should be an official issue, but it seems nobody cares of this detail

This issue is stale because it has been open 90 days with no activity. It will be closed soon. Please comment/reopen if this issue is still relevant.