Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

symbols not read by jsPDF #3708

Open
MROVIC opened this issue Feb 17, 2024 · 3 comments
Open

symbols not read by jsPDF #3708

MROVIC opened this issue Feb 17, 2024 · 3 comments

Comments

@MROVIC
Copy link

MROVIC commented Feb 17, 2024

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.

@MROVIC
Copy link
Author

MROVIC commented Feb 18, 2024

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

@MROVIC
Copy link
Author

MROVIC commented Feb 19, 2024

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 !

@MROVIC
Copy link
Author

MROVIC commented Feb 24, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant