Op 6/09/2012 5:34, WMJ schreef: > I've gotten an existing PDF file which contains fonts that is not > subsetted. If the fonts are not installed in the system, the document > can't be displayed correctly. I definitely know what fonts are > suitable for those document. How can I subset those fonts into the PDF > file?
If you don't know anything about the font, there's no easy answer to this question. If you do know all the properties and there are no special circumstances (no custom encoding and stuff), then you may take a look at this example: http://itextpdf.com/examples/iia.php?id=288 Note that this embeds the FULL font. If you want to subset it, you'd need to parse all the content streams in the PDF to find out which glyphs are used. That's NOT a trivial task. ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php