I am working with itextsharp and everything has been going well.  I am
creating a dynamic PDF & AcroForm from a database.  While creating the PDF
based on the data in the database I create radio buttons, checkboxes,
textfields, and multilinetextfields.  Since creating pdfFormFields is
completely based on absolute positioning on the page my strategy has been to
write out a place holder (empty) paragraph and then create the pdfFormField
on top of it based on the current vertical position on the page (after
writing the empty paragraph) and the height of the multilinetextfield.  

The problem I am having is with the writer.getVerticalPostition() method. 
It seems to work but I have found a weird happening and I am not sure it is
my code or itextsharp (probably my code).  But it appears that the
getVerticalPosition is going to the next page way too early.  Here is the
test code I am doing:

y = writer.GetVerticalPosition(false) - 75;
document.Add(new Paragraph(75, "   ") {IndentationLeft = 20});
afterY = writer.GetVerticalPosition(false);

In all instances but one that I have found y == afterY.  However, when y =
184.5, after adding the placeholder paragraph afterY = 756.  I am very
confused by this.  What ends up happening is that the multilinetextfield
that should have been at the end of page A now goes to the beginning of page
B (and is mostly off screen).

I hope some of this makes sense and I appreciate any help!


-- 
View this message in context: 
http://www.nabble.com/Problem-with-Vertical-Positioning-in-Document-tp22235088p22235088.html
Sent from the iText - General mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php

Reply via email to