Nirmal Fernando wrote:
> How can I retrieve Fonts of an existing PDF? Is there a way in iText to 
> read the fonts embedded and replace them with a different type of font??

This isn't necessarily impossible, but in most cases it's very difficult 
and in some cases it's very unwise.

For instance: what if only a subset of the font is present in the PDF? 
Then you'll never be able to retrieve the full font, and will you 
replace this subset with a full font or a corresponding subset?

Do you know anything about encoding? Do you know anything about CMaps? 
Do you know anything about the differences in metrics?

For instance: the width of the words "Foobar Film Festival" is 178.74 pt 
in Helvetica, but only 157.90 in Times-Roman for the same font size 
(12). In other words: if you replace Helvetica with Times-Roman, you'll 
screw up your entire layout. Remember that PDF is NOT a Word processing 
format; every glyph is positioned at a predictable location. If you want 
to change the font, you need to do the layout all over again. That is: 
recreate the PDF from scratch.
-- 
This answer is provided by 1T3XT BVBA
http://www.1t3xt.com/ - http://www.1t3xt.info

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to