-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Other languages in pdfmake #562
Comments
any news regarding this? |
I do not know these languages, but: |
Can you give me an example of how to accept for example English an another one? Thanks!!! |
Manual of how to use custom font: https://github.com/bpampuch/pdfmake/wiki/Custom-Fonts---client-side |
Its working for few fonts but Lohith-kannada.ttf font not working and gives blank spaces. Also baraha-kannada.ttf font gives jumbled words. Myself asked a question in Stack overflow here. |
@liborm85 , Myself tried with |
Kannada currently not supported (see test report). Implementation is required to fontkit library, which pdfmake uses. |
@liborm85 Find the referenced issue above. |
@mpsbhat That's good. As soon as the new version of fontkit, it will work in pdfmake also. |
@liborm85 , can we test it before release of new version of fontkit? Myself searching within the pdfmake files but didn't found the fontkit library call. |
@mpsbhat pdfmake calls only the pdfkit library. Calling the fontkit library is up to pdfkit library. |
Ok @liborm85 Thank you for the info. |
Finally succeeded build :) pdfmake + fontkit-dev with kannada/indic support: I don't know if it is correct build, but it looks like it works. :) I try it with this font: https://github.com/devongovett/fontkit/blob/indic/test/data/NotoSans/NotoSansKannada-Regular.ttf |
The above build gives blank pdf :( The base64data as follows: |
Here is my full test script: pdfmake-indic-test.zip |
Thanks @liborm85 :) |
How can we use both English & Kannada fonts simultaneously? |
You create |
fontkit 1.7 has full support for indic scripts, including Kannada and 9 others. See foliojs/fontkit#99 for details. |
New version pdfmake released. |
When using new build. |
On playground generating pdf works ok. Attach any sample script for reproduce problem. |
|
This could not work in an older version.
But in |
We have used the latest build of pdfmake. Do we use like this?
after defining
Also tried setdefaultstyle attribute. But no use. |
Roboto is default font is no need to define it in Here is my test script: test.zip.gz Try it. |
Thank you @liborm85 ..!!! Got it...!!!
That is combination of two fonts which coming from server side through ajax call. What will be the work around for this combination? |
{
text : [
{
text: 'Test '
},
{
text : 'ಕನ್ನಡ ',
font: 'mfont'
}
]
}, |
We just wondering if there is something text like say We will try it out the above solutions and let you know if any hurdles. Thanks a lot @liborm85 and @devongovett for great support...!!! |
@mpsbhat did you found any solution for multiple language in same sentence? |
Yes, we followed the steps given above by @liborm85 for custom fonts and it's working fine by updating vfs_fonts.js file with required fonts. Also we have to refer the font in doc definition object as mentioned based on language like |
@mpsbhat could u please show ur working result ? I also faced this issue as well when multiple languages is in the same sentence like this : Khmer ខ្មែរ |
@noeurphireak Did you guys find a solution that would work for multiple language text in the same sentence? |
@rumman0786 @noeurphireak Note: we had created vfs-font.js file as explained and initialized the font reference at the beginning of javascript.
|
try using "Arial_Unicode_MS", this font supports many languages. |
The default vfs file cannot be used directly for custom fonts. You should build one as mentioned in the documentation. |
@mpsbhat yes I have Executed the command node build-vfs.js "./examples/fonts to build the font file |
Is it possible to add other language support other than English (UTF-8) in pdfmake library? something like,
The text was updated successfully, but these errors were encountered: