I defined a tag map, and got a XML data file. I want to convert the XML data file to PDF by using iText. The question is how to embed fonts (e.g. Polish font, Chinese font) into the target PDF when converting XML to PDF?
相关问题
- F#: Storing and mapping a list of functions
- Set BaseUrl of an existing Pdf Document
- how to Enumerate local fonts in silverlight 4
- Scaling png font down
- How to get coordinates of an svg?
相关文章
- embed 循环播放MP3文件(loop="2"变成无限循环)
- How to dynamically add wmode=transparent to Youtub
- Tag multiple branches in git?
- Loading custom font using JavaFX 8 and css
- Generating .afm from .ttf [closed]
- Vue Cli 3 Local fonts not loading
- How to reduce PDF file size programmatically in Ja
- jQuery Select2 Tag on Blur
If you are doing more work with iText, you may want to invest into the iText book - it has examples for all the features of iText.
There is a parameter that you specify when you create your font that defines font embedding:
You can find more iText font related examples here: http://1t3xt.info/examples/browse/?page=toc&id=14
However, you will have problem if you will not have single font matching any characters used by you and you need multiple fonts.
In this case the FontSelector class is for you.
I've written a short article about that:
http://lechlukasz.wordpress.com/2010/01/06/using-dynamic-fonts-for-international-texts-in-itext/
You can try transforming it into PDF/A which has all the fonts embedded.
Here's a really easy way of instructing iText to embed all fonts. Insert this before your code to load fonts: