I am having an issue where I am stamping a PDF template.
Here is my setup:
I have a PdfStamper and a template with a bunch of form fields on it. I am
using some of the form fields as placeholders for PdfPTables that I create
in java. So I get my place holder dimensions like this:
float [] fieldPositionsStatement = form.getFieldPositions("statement");
then i pass fieldPositionsStatement to a class that will set up my
columnText like this:
(new PdfStatementTable()).addStatementTable(bill,
stamper.getOverContent((int)fieldPositionsStatement[0]),
fieldPositionsStatement)
which calls this method
public void addStatementTable(SewageBill bill, PdfContentByte cb,
float[]
pos) {
ColumnText c1 = new ColumnText( cb );
// Why do i need to add 50 to the X factors???
c1.setSimpleColumn( pos[1] - 50f, pos[2] - 50f, pos[3] + 50f,
pos[4] );
c1.addElement(createTable(bill));
try {
c1.go();
} catch (DocumentException e) {
throw new RuntimeException(e);
}
}
So my problem is that when i call setSimpleColumn, I need to expand the
column text with arbitrary values for some reason. The place holder
coordinates that i am using are resulting in a columnText that is smaller
than the place holder -- by a percentage it seems.
I use this basic method to fill in two separate sections which are different
sizes. In one i need to add 50f, the other i need to add 20f.
is there padding or something that I am missing that i need to remove from
the columnText? I can't find any in debug mode when i interrogate the
fields.
--
View this message in context:
http://old.nabble.com/ColumnText-setSimpleColumn-with-getFieldPositions%28%29-tp28042812p28042812.html
Sent from the iText - General mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://www.itextpdf.com/book/
Check the site with examples before you ask questions:
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/