My fields can be rich text fields, single line text fields or multi line text fields. I want a reliable way of extracting the Font from an AcroField properties.
It will be kind if you could provide me a sample on how to do this.
regards,
Abhishek.
On 8/8/06, Leonard Rosenthol <[EMAIL PROTECTED]> wrote:
At 01:39 PM 8/7/2006, Abhishek Srivastava wrote:
The properties which I want to extract are
textfont
textcolor
textsize
text alignmentIs this a single line or multi-line field? Is this a rich text field?
I printed the properties of two acrofields and the output was
1. /FT -- /Tx
/RV -- <?xml version="1.0"?><body xmlns=" http://www.w3.org/1999/xhtml" xmlns:xfaAn RV in your field means that it is a RICH TEXT field and as such many have text in MULTIPLE fonts, colors, etc.
2. /Rect -- System.Collections.ArrayList
/AP -- Dictionary of type:For a non-rich text field - the styling info is here..
I can see that tokenizing /DA will give me font, font size and font-weight. however how about text alignment?/DA is the DEFAULT APPERANCE. You need also to parse the actual /AP dictionaries to find the CURRENT appearance. If the font is embedded and not of the Base14, then you have even more work ahead of you.
For field 1, the text alignment is present in /RV tag, but this tag doesn't appear for all other fields. For fields which don't have /RV tag, how to extract text alignment?It's a subset of HTML. Documentation in the PDF Reference.
The second risk which I see is that I have to do string tokenization to extract the values of font name, font-weight and font size. However this may be error prone. Can I assme that the format of /DA will always be <font-name>,<font-weight> <font-size>?Nope.
Again, documentation in the PDF Reference.
Leonard
---------------------------------------------------------------------------Leonard Rosenthol < mailto:[EMAIL PROTECTED]>Chief Technical Officer < http://www.pdfsages.com>PDF Sages, Inc. 215-938-7080 (voice)215-938-0880 (fax)
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions
