Add a table to page 4 with doc.add(...) which may span multiple pages
(but shouldn't print over the coupon)


Normally, if you change the margins back to 36,36,36,36 BEFORE adding
the table, these new margins should only be active on page 5.
However: your questions tell me that probably isn't the case. If not,
you've found a bug.

 

The issue, if I remember correctly, is that once you change those
margins before you add the table, calls to doc.bottom() will return 36
even though the table will stop at 250 and move to the next page.

 

In other words, doc.bottom(..) will return the unit set by the most
recent setMargins(...), not the actual bottom of the document

 

Example on the way....

 

Jason

 

From: 1T3XT BVBA [mailto:i...@1t3xt.info] 
Sent: Friday, July 29, 2011 11:20 AM
To: Post all your questions about iText here
Subject: Re: [iText-questions] Fwd: Document getBottomMargin() bug

 

On 29/07/2011 15:49, Jason Berk wrote: 

1)      Create a document with default (36 point) margins


OK.




2)      Add 3 pages of content


OK




3)      Change the margins to 36,36,36,250 (the bottom of page 4 has a
payment coupon)


OK, you'll use the lower 250 pt to add the coupon at an absolute
position.




4)      Page break


OK, the 250pt bottom margin should be active because of the newPage().




5)      Add a table to page 4 with doc.add(...) which may span multiple
pages (but shouldn't print over the coupon)


Normally, if you change the margins back to 36,36,36,36 BEFORE adding
the table, these new margins should only be active on page 5.
However: your questions tell me that probably isn't the case. If not,
you've found a bug.


This is a transmission from Purdue Federal Credit Union (Purdue Federal) and is 
intended solely for its authorized recipient(s), and may contain information 
that is confidential and or legally privileged. If you are not an addressee, or 
the employee or agent responsible for delivering it to an addressee, you are 
hereby notified that any use, dissemination, distribution, publication or 
copying of the information contained in this email is strictly prohibited. If 
you have received this transmission in error, please notify us by telephoning 
(765)497-3328 or returning the email. You are then instructed to delete the 
information from your computer. Thank you for your cooperation.

------------------------------------------------------------------------------
Got Input?   Slashdot Needs You.
Take our quick survey online.  Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
_______________________________________________
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

Reply via email to