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
Issues with UTF-8 characters #165
Comments
i has same error, please support! |
I've come across the same issue. Will UTF-8 be supported in the future? |
The problem is known and needs to be fixed in PDFkit, the library pdfmake is using for actual pdf generation. Have a look at these issues: |
on 30 Jul 2014, pdfkit had been released the version v0.6.3 (https://github.com/devongovett/pdfkit/releases) but! in your pdfmake,your still use the new old pdfkit version(old than v0.6.3 )! |
Hi @wwwmir3cq, Thanks for the suggestion. We can upgrade the pdfkit library but the issue will not go away. Why? There are two ways to use fonts in pdfs.
The fix you present uses a standard font. But pdfmake only uses embedded fonts. Using embedded fonts is easier for a library like pdfmake, because we can use it to calculate the width of a text. However, I'm happy to accept a pull request when someone wants to offer using a standard font. |
how to fix this bug???? |
Hi jthoenes I came directly realized by pdfkt lib, because pdfmake made packages on pdfkit, modify the pdfmake lib more complex
But the way, this on the word of the relatively small number of cases can solve the problem, if the number of words is large, there is a serious performance issues ,because, arrayBuffer is very big,when we do doc.registerFont(newFontName, arrayBuffer) A lot of times,it will Occupy many memory. |
There is a pull request #211 which potentially fixes this issue. Please review the code! |
i checkout this branch ,but the issue is still not resolved -_-! |
@JohnnieFucker Have you made sure to run |
any news about this issue? |
Hey guys, I maintain PDFKit, the library that pdfmake uses to actually write PDFs. I've been working on a new font engine called fontkit which will power PDFKit's font support going forward. It supports tons of advanced typographical features, including ligatures, kerning, contextual substitutions, TrueType and PostScript outlines, etc. in both OpenType and AAT fonts. There's a branch of PDFKit using fontkit currently in progress. It embeds fonts as PDF CID fonts, which allows for much better support for large character sets. I hope to release it very soon (working on a few final issues), but if you're feeling adventurous, please try out the fontkit branch of PDFKit and see if it works with pdfmake. It is likely that some modifications will be needed here if pdfmake accesses font properties directly, so I thought I'd let you all know so you know where we're heading. Let me know if you have any issues! |
I have an idea of partial workaround in current version of pdfmake. |
@devongovett sounds great |
@gnibeda Can you check with the 0.1.18. |
In 0.1.18. issue was resolved. Tested on example above and in real application. Thank you! Can you take a look at: |
@jthoenes I tested out my example and it looks to be working correctly. That's great news. Thanks. |
@jthoenes , thanks so much. I confirmed that the |
I am using pdfmake to write down documents in danish, and I have problems using the danish letters æøå. I don't really see how you get it to work here in this post, can someone explain it? Btw, really nice library! |
I'm using 0.1.18, but still have problems with japanese. I'm using Japanese fonts, but if i generate a pdf only with latin character, i see all ok. If i generate a pdf with also a japanese character, i see that problem i described above. |
I have problems with fonts on v0.2.0-alpha.0 and v0.1.71 versions in Chrome I'm using default font (ROBOTO) and custom fonts and in both case I've the same result. The font is renders correctly when the PDF is generated in Firefox, but not in Chrome. avión año (Firefox) It's not working when I create a pdf in local using (Chrome) but if I run the code in Firefox or in http://pdfmake.org/playground.html it's working perfectly. I'm working on MacOS. |
I've come across an issue when trying to create a PDF that is written in Vietnamese. If you try this object in the playground you will see that the text on page 4 does not look right. If you copy the text from the generated PDF and paste it into Notepad then you will see that the text will be correct in Notepad.
If you compare page 4 of the above object with the one below which has removed the other 3 pages you will see that most of the text will display fine but there is still some problems near the bottom.
Is this a problem with how the object is structured?
The text was updated successfully, but these errors were encountered: