-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Tagging correctly languages / With Arabic font Adobe Acrobat Reader DC shows only first line of text on the page #1720
Comments
I think i was able to fix it in the latest commit a month ago. Did you use the current code, or did you use the one i gave you once? |
This was with the latest master commits. Indeed about a month ago
|
I will think about it, but I think we should release so that we have atleast a new base |
I can appreciate that. However I have not seen much activity since your last commits. When will this be released? |
I remembered something: What happens if you remove or comment out these lines in your jspdf
Does it show then the text completely? |
Yes now it shows all texts |
yeah i remember now, that it was this language tagging which i couldnt fix and i didnt found a sample for multiline |
Seems OK without it so what does it do? |
Well it shows that a line is in a specific language. Probably used by screen readers or translation software. I dont know. Can you please do me a favor and just comment out the line Then I could upload it to #1736 and merge it before James releases it today. I have to go to work, and I have some modifications in my current codebase, which were fixes for this issue, but I dont know if they were good or not, and before I mess up my code, which i didnt touched for 2 months... |
I tried before to get these tests running on my machine but that failed rather miserably. I'm at work too so I generated the PDF using a hardcoded testcase, with the language tag in comment. Test case and result are in the zipfile. |
would you please help me i get this message when i test your code : |
saveAs not defined => you need FileSaver.js |
@arasabbasi thanks ,but when i use doc.viewerPreferences({Direction: 'R2L'}); |
Build the package |
@arasabbasi Some characters do not appear correctly,for example :الامارات looks in pdf: |
@mgroeneweg can i use another font instead of Amiri ? and how to get base64 of the font ,for example Traditional Arabic font |
@alidib81 Can be... I had to write the "logic" for connecting letters all by myself and little help of other frameworks. It is kind of hard to code it and have it completely refactorable. But because I dont know if you are using the latest arabic i wont start debugging. And yes you could use traditional arabic font. Get the ttf and use an online base64 encoder... google wll help you. |
@arasabbasi i tried to use traditional arabic font. but i got blank page..
|
|
Thank you for submitting an issue to jsPDF. Please read carefully.
Are you using the latest version of jsPDF?
Yes
Have you tried using jspdf.debug.js?
No it does not contain all necessary files like vfs.js. I don't know how the build works to create a fresh one.
Steps to reproduce
Test.zip
What I saw
In Chrome it works:
In Adobe reader it does not work:
With other tests, Adobe reader sometimes pops up an error that there is an issue with the document. No specific information what it does not like.
What I expected
To be able to open the PDF and see all added texts.
The text was updated successfully, but these errors were encountered: