Op 20/02/2012 7:30, manoj kumar schreef:
> Is this possible to extract text font style from pdf?

The concept of font style doesn't really exist in PDF. For instance, if 
you have the font family Helvetica, different fonts will be used for the 
styles normal, bold, italic and bold-italic. In this case, you won't 
find a parameter setting the style, you'll have to determine the style 
based on the name of the font. For instance, if the name is Helvetica, 
you'll probably have a normal font. If the name is Helvetica-Bold, 
you'll probably have a bold font. However, as each program has the 
liberty of choosing its own name for a font, you could have a font named 
Helvetica-vet or Helvetica-gras. 'Vet' is bold in Dutch, 'gras' is bold 
in French; how are you going to known the style is bold if somebody uses 
these words in a font name? The same goes for 'italic' and 'oblique'; it 
isn't even necessary for a font to give away information about its style.

Moreover, some programs use trick to mimic styles. For instance: one 
could change the render mode to mimic bold, one could change the text 
matrix to mimiic italic.

In short, you have a lot of work coming your way if you need to read a 
PDF to find out which style was used. I hope this answer helps. Have fun 
coding!

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
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

Reply via email to