Thanks currently running tests but looks good so far.
-----Original Message----- From: 1T3XT info [mailto:i...@1t3xt.info] Sent: 04 May 2010 18:15 To: Post all your questions about iText here Subject: Re: [iText-questions] PdfPTable pushing susbsequent text down when switching between landscape and portait orientation. 1T3XT info wrote: > For the moment, I haven't found a good fix for this problem. And now I (may) have a fix. This should be tested on other examples though. --- trunk/src/core/com/itextpdf/text/pdf/PdfDocument.java 2010-05-03 23:02:10 UTC (rev 4503) +++ trunk/src/core/com/itextpdf/text/pdf/PdfDocument.java 2010-05-04 17:11:28 UTC (rev 4504) @@ -1051,10 +1051,6 @@ writer.resetContent(); graphics = new PdfContentByte(writer); - text = new PdfContentByte(writer); - text.reset(); - text.beginText(); - textEmptySize = text.size(); markPoint = 0; setNewPageSizeAndMargins(); @@ -1075,8 +1071,6 @@ float oldleading = leading; int oldAlignment = alignment; - // we move to the left/top position of the page - text.moveText(left(), top()); pageEmpty = true; // if there is an image waiting to be drawn, draw it try { @@ -2173,6 +2167,12 @@ marginTop = nextMarginTop; marginBottom = nextMarginBottom; } + text = new PdfContentByte(writer); + text.reset(); + text.beginText(); + textEmptySize = text.size(); + // we move to the left/top position of the page + text.moveText(left(), top()); } -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info ------------------------------------------------------------------------ ------ _______________________________________________ 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/ Connaught plc is a FTSE 250 company. We are the UK's leading provider of integrated services operating in the compliance, environmental, social housing and public sector markets. Please visit our website to see a full list of Connaught's Registered Companies www.connaught.plc.uk/group/aboutconnaught/registeredcompanies Disclaimer: The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete this message. Connaught plc, Head Office 01392 444546 ------------------------------------------------------------------------------ _______________________________________________ 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/