You could possibly override the newPage method to take into account your 
special case, and not actually create the page if certain criteria are not met. 
 Haven't fiddled much with newPage though.
 
Matthew

-----Original Message-----
From: Anthony Oganesian [mailto:t...@wonderlandresearch.com]
Sent: 24 November 2009 10:48
To: iText-questions@lists.sourceforge.net
Subject: [iText-questions] problem with adding content to the last page



Hi,

 

I am running into a strange blocker issue with a very simple requirement and 
would greatly appreciate any help from the community.

 

I need to add various elements (text, images, SVGs, etc ...) using absolute 
positioning to the LAST PAGE of the pdf document that I am generating.  As I am 
adding the regular (free-flowing) content to the document, iText is creating 
new pages automatically for me. As soon I am done with the free-floating 
content, I find myself on the last page and I am able to add all the special 
(absolute-positioning) elements that I need to add to the last page.

 

It all works as described except for a very special case when the free-floating 
content fits PERFECTLY onto the last page. As far as I could understand the 
code, in this case iText is immediately creating the new page in anticipation 
of me adding more free-floating content (But there is none left). Instead my 
absolute-positioning content is now drawn on the extra blank page at the end of 
the document.

 

Is there any workaround for this?

 

Thanks a lot in advance for any hints/pointers

 

Tony.


This email was received from the INTERNET and scanned by the Government Secure 
Intranet anti-virus service supplied by Cable&Wireless in partnership with 
MessageLabs. (CCTM Certificate Number 2009/09/0052.) In case of problems, 
please call your organisation's IT Helpdesk. 
Communications via the GSi may be automatically logged, monitored and/or 
recorded for legal purposes.



Land Registry's House Price Index is now live. www.landregistry.gov.uk

If you have received this e-mail and it was not intended for you, please let us 
know, and then delete it. Please treat our communications in confidence, as you 
would expect us to treat yours. Land Registry checks all mail and attachments 
for known viruses, however, you are advised that you open any attachments at 
your own risk.



The original of this email was scanned for viruses by the Government Secure 
Intranet virus scanning service supplied by Cable&Wireless in partnership with 
MessageLabs. (CCTM Certificate Number 2009/09/0052.) On leaving the GSi this 
email was certified virus free.
Communications via the GSi may be automatically logged, monitored and/or 
recorded for legal purposes.
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
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/

Reply via email to