Hi, everyone.
1) Please advice a simple way to get field font and size. As a result I
need an instance of BaseFont class. I found only not good-looking
solution:
...
final Item item = acroFields.getFieldItem(fieldName);
final ArrayList list = item.merged;
if (list != null) {
for (final Iterator it = list.iterator(); it.hasNext();) {
final PdfDictionary itemDict = (PdfDictionary) it.next();
final PdfObject da = itemDict.get(PdfName.DA);
final StringTokenizer st = new StringTokenizer(da.toString(), "
");
final String fontRef = st.nextToken();
final PdfName fontRefName = new
PdfName(PdfName.decodeName(fontRef));
final PdfDictionary font = (PdfDictionary) dr.get(PdfName.FONT);
final PRIndirectReference fontIndRef = (PRIndirectReference)
font.get(fontRefName);
final BaseFont baseFont = BaseFont.createFont(fontIndRef);
final float fontSize = Float.parseFloat(st.nextToken());
}
2) Please advice how to check is the text field is a multiline field or
not. I understand how to add(remove) a new FF property to the field
item, but how I can parce /FF value to the set of field properties?
For example: /Ff 4097 = PdfFormField.FF_READ_ONLY +
PdfFormField.FF_MULTILINE
Is there exists any standart method?
itext-1.3.1.
Best Regards,
Dzmitry Pershyn
Senior Software Engineer
EPAM Systems
Minsk office, Belarus (GMT+2)
Office phone: +375 (17) 210-1662 Ext. 1010
Office fax: +375 (17) 210-1168
E-Mail: [EMAIL PROTECTED]
WWW: http://www.epam.com <http://www.epam.com/>
CONFIDENTIALITY CAUTION AND DISCLAIMER
This message is intended only for the use of the individual(s) or
entity(ies) to which it is addressed and contains information that is
legally privileged and confidential. If you are not the intended
recipient, or the person responsible for delivering the message to the
intended recipient, you are hereby notified that any dissemination,
distribution or copying of this communication is strictly prohibited.
All unintended recipients are obliged to delete this message and destroy
any printed copies.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/