Hi,

I am facing a problem with margins. The Tutorial says "If you change the
margins, this has an immediate effect". How this does not seem to be
working, I may be doing something wrong.

Our application generates multiple pages dynamically.
- Each page has a header image of different size.
- Following the header is the content for the page.

We have added the images using writeSelectedRows(PDFPTable, location) and we
are setting the top margin equal to the height of the image. So the area
within the margins is where the content goes. (We cannot change this
implementation, it would result in lots of rework)

Everything works fine, unless we have a page where the content fits exactly
in one page.
In this case, on the next page, the margin still remains the same as that of
the previous page, even though we are setting the margin for the new page
before adding the content.

So the result is an extra space between the image and the content on Page 2,
as the page 1 image is bigger than page 2 image.

What we have observed is that when the content fits exactly on one page, the
startPage and endPage event handlers are getting called, even if the content
actually does not go to the next page. In this case only, do we get the
above problem.

What we have tried:
-------------------
1. Setting margins in startPage/endPage
2. Setting margins after adding part of page content (normally we do it
before adding any content.

Any help on this would be greatly appreciated.

Sheldon Fernandes



-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to