olifolkerd / tabulator

Interactive Tables and Data Grids for JavaScript
http://tabulator.info
MIT License
6.7k stars 818 forks source link

Problem in saving Persian/Farsi locale data in PDF file. #1764

Closed alimp5 closed 5 years ago

alimp5 commented 5 years ago

Describe the bug I have Persian/Farsi info as data in html table. I don't have any problem in showing Persian/Farsi locale data in Tabulator table. But when i click on "Download PDF" button and save table's data as PDF file,, the Persian/Farsi data are corrupted. Link: https://imgur.com/a/Xdlncgr

I thought if i use the last version of JsPDF plugins, i can test locale problems and find the root cause of problem......!!!! Also, Tabulator 4.x is not compatible with last version of "JsPDF=>3.0.4 and 1.5.3". and i should use the versions of below link: http://tabulator.info/docs/4.0/download#pdf

<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.5.3/jspdf.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jspdf-autotable/3.0.4/jspdf.plugin.autotable.js"></script>

Tabulator Info

Expected behavior I must to see "حسین رضا زاده" as data in PDF file. but I'm seeing "-3ÌF 16' 2'/G" as a corrupted data.

Screenshots https://imgur.com/a/Xdlncgr

Desktop (please complete the following information):

olifolkerd commented 5 years ago

Hey @alimp5

This is a know limitation. if you look at the PDF Downloader Documentation it clearly states that this is due to current limitation in the autotable plugin, and points to issue #1539 which includes a work around for it.

It is already on the roadmap to update the dependencies for autotable in the next release version 4.2 in a week or so's time.

I hope that helps,

Cheers

Oli :)