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
UTF-8 Support #17
Comments
Please fill free to provide UTF-8 support to this library. |
I would like to use Chinese character to print. Error message: Can anyone help? |
I need this feature too 💯 Any schedule for this feature? Ps: thanks for sharing this with us! |
Yes it supports only Latin chars, but you are welcome to 8mplement Unicode.
…On December 19, 2018 12:50:04 AM GMT+01:00, anondev32 ***@***.***> wrote:
I need this feature too 💯 >
Currently it seems like only ascii 2 is supported.>
>
Any schedule for this feature? >
>
Ps: thanks for sharing this with us!>
>
-- >
You are receiving this because you commented.>
Reply to this email directly or view it on GitHub:>
#17 (comment)
--
Envoyé de mon téléphone Android avec K-9 Mail. Excusez la brièveté.
|
There is already a branch that supports unicode. |
@anondev32 Which branch is it please? |
There is an error aswell, you need to comment this line out: #26 The branch is called unicode. File stream.dart change it to: |
@anondev32 Can you output any string correctly using this branch? It is just missing the cmap database from the ttf fonts. |
I can output everything just fine. Altough i have a Problem viewing it in the original Adobe Reader, it works with i.e. Foxit Reader and Mobile devices. I'm loading Fonts like this:
|
So, actually I debugged my app on iOS an their PDF Viewer has the same bug as Adobe's. |
Another Update: Creating the PDF is not the issue, the problem is with viewing it. If I can help you in any matter please let me know I am eager to help. Best regards Daniel |
It is a complex change. We need font subsetting first I think to be able to reorganize the glyphs. |
So, in the meantime, can you please provide us a way to use the PdfFont helvetica then? The spacing between characters is too large for my usecase. I tried digging int o PdfFont.helvetica() and changing the widths, but nothing happens. Where can I adjust these settings for my needs? |
If you store strings from the iOS kbd that are surrounded with single or double quotes, you can get forward and backward single and double quotes into your strings. It took me a long time to figure out replaceAll on "'" and '"' was not working, because the actual chars stored were one of 8216, 8217, 8220, and 8221. So something like this will replace them with a back quote... String cleanString(String s) => s == null ? '' : s Probably a more elegant way, but I'm a java geek who is still in the dart early learning period. BTW - Dave, will your new Text pdf widget do auto wrapping if its constrained ? |
@biancashouse Yes, the text widget auto-wraps. |
Pdf version 1.3.5 implements that. |
Thanks a lot! We'll check it out. |
I changed from 1.3.4 to 1.3.5, but the chinese word(utf8) still not work. |
You have to use a TrueType font that has the right glyphs you try to display. |
Is there any example of correct utf8 usage. I changed to 1.3.5 and use a True Type with cyrillic from assets, inhereit the font style from context, but still receive an error |
Hello,
I have encountered a problem with drawString method and utf8 characters. After calling for example
g.drawString('E.B. Lukáča');
, method throws exception. After debugging, it looks like there is support only for Latin1 which does not contain all characters I need. In this example it is letter 'č'. Is it possible to add UTF-8 support?
Thanks in advance.
The text was updated successfully, but these errors were encountered: