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/

Reply via email to