Pass in the appropriate parameters to setAbsolutePosition(), after getting the pagesize of the page with the watermark.. Some math is required here.


On 12/7/05, Sandeep Prabhu <[EMAIL PROTECTED]> wrote:
 I am using the itext classes for watermarking my PDFs.
But the watermarks appear at different locations when using different sizes of papers.

The API for setting the watermark image as given in the sample files is like:-
img.setAbsolutePosition(50, 200);

By using this api if I center the image for an A4 size paper it comes at the bottom for a A3 size paper and it gets cut if the document used is in landscape mode.
So the watermarks doesn't appear at the center for all sizes of papers used.

Is there any way to center the image irrespective of paper size??

Thanks & Regards

Sandeep


Yahoo! DSL Something to write home about. Just $16.99/mo. or less


Reply via email to