Hi,
Im creating a form by adding the text fields to a PDFTable and then adding
submit and Reset buttons
at the bottom. However, the submit button seems to stay aligned Right even
thought the defualt Cell
Horizontal Alignment is set to Center:
table.getDefaultCell().setHorizontalAlignment(Element.ALIGN_CENTER);
I would like the cell with the submit button to be aligned Centered or Right.
Cant seem to be able to
find what is wrong in the below code. any pointers?:
PushbuttonField submitBtn = new PushbuttonField(writer,
new Rectangle(0, 0, 35, 15),"submitPOST");
submitBtn.setBackgroundColor(BaseColor.GRAY);
submitBtn.setBorderStyle(PdfBorderDictionary.STYLE_BEVELED);
submitBtn.setText("Login");
submitBtn.setOptions(PushbuttonField.
VISIBLE_BUT_DOES_NOT_PRINT);
submitBtn.setAlignment(Element.ALIGN_RIGHT);
PdfFormField submitField = submitBtn.getField();
submitField.setAction(PdfAction
.createSubmitForm(
"http://localhost:8080/submit.php",
null, PdfAction.SUBMIT_HTML_FORMAT));
cell = new PdfPCell();
cell.setMinimumHeight(15);
cell.setCellEvent(new FieldCell(submitField, 35, writer));
cell.setHorizontalAlignment(Element.ALIGN_RIGHT);
table.addCell(cell);
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
_______________________________________________
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