simonbengtsson / jsPDF-AutoTable

jsPDF plugin for generating PDF tables with javascript
https://simonbengtsson.github.io/jsPDF-AutoTable/
MIT License
2.31k stars 624 forks source link

HTML Entities or HEX Code issues for symbols #1035

Closed MROVIC closed 7 months ago

MROVIC commented 7 months ago

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: the result is always the same, they are rendered wrongly (here attached a test screenshot).

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.

symbols_test

MROVIC commented 7 months ago

symbols_in_fonts

simonbengtsson commented 7 months ago

Weird! Since I believe this is related to jsPDF and not this plugin I'll tag as question.

MROVIC commented 7 months ago

@simonbengtsson you're right, in fact I sent it also to jsPDF, correct to tag this here as question (sorry). yes, it is very strange indeed: 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 commented 7 months ago

nobody replied in Parallax: 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 (compliments for autoTable: it is great!)

github-actions[bot] commented 7 months ago

This issue will soon be closed since issues in this project are mainly meant to be bugs or feature requests. Questions are directed to stackoverflow.