Hi all,

I have an iText app linked against v1.02b that is demonstrating some weirdness.

I have a document containing pages that alternate between portrait and landscape. Page 1 is portrait, this works fine. Page 2 and 3 are landscape, this works fine. Page 4 is supposed to be portrait again, and this is where things go pear shaped.

Page 4 is rendered landscape, but with the content of the page in portrait. As the content won't fit onto the page (it's chopped off about 2/3 of the way) it runs onto a second page. This second page, Page 5, rendered in portrait, with the rest of page 4, still rendered in landscape on it.

Page 6 is landscape again, and works fine. Any further portrait pages have the same problem.

When the page 4 is rendered, and the flip from landscape back to portrait accurs, the code goes like this:

        /* set up the document */
        document.setPageSize(PageSize.A4);

        /* create a footer for this document */
        document.setFooter("footer string");

        /* open the document */
        if (document.isOpen()) {
                document.newPage();
        } else {
                document.open();
        }

When any of the landscape pages are rendered, the code goes like this:

        /* set up the document */
        document.setPageSize(PageSize.A4.rotate());

        /* create a footer for this document */
        document.resetFooter();

        /* open the document */
        if (document.isOpen()) {
                document.newPage();
        } else {
                document.open();
        }

The second piece of code works, the first does not. Does anybody know why?

While I was using an old v0.99-era version of iText, this problem would occur every now and again randomly. Now that I am using v1.02b, this problem happens all the time.

I can show an example PDF, but I will have to mail it privately, as it contains confidential info.

Regards,
Graham
--



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to