I performed a search in the archives for this topic however I was unable to find a solution that fits my needs.  I apologize if this has already been covered.  My problem is when attempting to add a PdfFormField object to a PdfPcell much like the following snippet the form field expands to the full size of the cell.  I would like to add the form field to the cell such that it is displayed in the dimensions specified in the Rectangle object and not the full size of the cell.  Is this possible, and if so are there any examples available that I can use as a reference?  Thank you in advance for your time.

 

Best Regards,

 

Jon Galentine

 

 

float[] widths = { 0.30f, 0.70f };

PdfPTable fieldTable = new PdfPTable(widths);

 

RadioCheckField bt = new RadioCheckField(writer, new Rectangle(10, 10, 20, 20), idAtt, value);

bt.setCheckType(RadioCheckField.TYPE_CIRCLE);                   

PdfFormField ck = bt.getCheckField();

 

PdfFormField textField = PdfFormField.createTextField(this.writer, false, false, Integer.parseInt(maxLengthAtt));

textField.setWidget(new Rectangle(100, 750, 342, 769), PdfAnnotation.HIGHLIGHT_INVERT);

textField.setFieldName(idAtt);

 

PdfPCell fieldCell1 = new PdfPCell();

fieldCell1.setMinimumHeight(20f);

fieldCell1.setCellEvent(new FieldPositioningEvents(writer, ck));

 

PdfPCell fieldCell2 = new PdfPCell();

fieldCell2.setMinimumHeight(20f);

fieldCell2.setCellEvent(new FieldPositioningEvents(writer, textField));

 

 

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to