[EMAIL PROTECTED] wrote:

Hi all , i want to open a document without  create a document object , my
goal is to add an image to a document using  PdfStamper to add thios  image
over the initial content , bat my problem is that i have some document
witch its opened in 30% or 40 % and when i ad the image it dos not added in
the place wich i want , my code :
I don't understand the question.
There is absolutely no correlation between opening a document
with a zoom factor of 30% or 40% and the location of an image
on a page.

                       Rectangle psize = reader.getPageSize(1);
Are you sure the page isn't rotated?

                       float width = psize.width();
                       float height = psize.height();

What is posx and posy in the next line?
Why this offset?

                       img.setAbsolutePosition(posx *( (2 * width) / 9),
posy *( height / 6));
The next line is weird. Why scale the image to 10,000 / the image height?

                       img.scalePercent((100/img.height())*100);

This doesn't look like an iText problem.
It's more like a Math problem.
br,
Bruno


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to