Ok , so I did this: float x = reader.getPageSize(1).width() - img.scaledWidth(); float y = reader.getPageSize(1).height() - img.scaledHeight();
Problem is the pictures are too big. Original page is 595.0 x 842.0 Picture is 834.0 x 1181.0 So I get this coordinates -239.0 x -339.0 Is there any way to fit(shrink) the original picture better in ? Cheers, Pete -----Ursprüngliche Nachricht----- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von bruno Gesendet: Mittwoch, 30. August 2006 09:40 An: Post all your questions about iText here Betreff: Re: [iText-questions] HowTo: Image Alignment Middle with PdfStamper Peter Neu wrote: >Is there a way round this? I can't do absolute positioning because the pictures have different size. > You know the page size and you know the size of the image. The math to center an image vertically is rather straightforward. br, Bruno ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions
