I'm using iTextSharp to populate the data to PDF Templates, which is created in OpenOffice. it populating fine, I'm getting proper PDF. In that PDF some where summary will come, that place i want align that text against the Template.
I'm doing below code but it does not work.
fields.setFieldProperty(fieldName, "fflags", PdfFormField.Q_LEFT, null);
Please Help.
Thanks.
Assuming that you have a pure AcroForm and not a hybrid form as I indicated in my comment, this is how you change the quadding of a field:
AcroFields form = stamper.getAcroFields();
AcroFields.Item item;
item = form.getFieldItem("fieldLeft");
item.getMerged(0).put(PdfName.Q, new PdfNumber(PdfFormField.Q_LEFT));
item = form.getFieldItem("fieldCenter");
item.getMerged(0).put(PdfName.Q, new PdfNumber(PdfFormField.Q_CENTER));
item = form.getFieldItem("fieldRight");
item.getMerged(0).put(PdfName.Q, new PdfNumber(PdfFormField.Q_RIGHT));
The quadding isn't part of the field flags as you wrongly assumed. It's and entry of the widget annotation dictionary.