The rotation in Image is made to define a rectangle and then put
the image in that rectangle. If you wnat to rotate the image relative to the
bottom left corner you must use the PdfContentByte.addImage() method with all
the matrix elements. See page 175 of the pdf reference.
Paulo
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of SeungHyun Park
Sent: Thursday, May 04, 2006 9:25 AM
To: [email protected]
Subject: [iText-questions] Image rotation problem.I'm developing PDF-related app usig iTextSharp 3.1.0.I have a problem with image rotation.I wrote code to rotate image as followings;( it is not a real code. This is some related code snippet. )------------------------------Dim img As Image=Image.GetInstance(fileName)img.RotationDegrees = Angleimg.ScaleAbsoluteHeight(Height)
img.ScaleAbsoluteWidth(lWidth)img.SetAbsolutePosition(x,y)cb.AddImage(img)
------------------------------When I tried this code on changing rotation angle, the image in generated PDF file did not pivot at the bottom left corner of the image.Indeed, poviting point was different at the each angle value.For examples, when image is rotated by 90 degrees, image seemed to be shift to the image height on the +X axis as this (landscape image is original 0 degree image.)|---------|| ||---------|----------| | || | |--------------------^|originI read iText tutorial and it said the pivoting point of rotation and transformation was bottom left corner of the image.I tried to assign transformation matrix values(a,b,c,d,e and f) to Addimge method.I barely found a transformation matrix that made pivoting point be bottm left corner but the scale and XY ratio of image was different to original image.How can I fix the pivoting point to the bottom left corner of image when image rotate ?Thank you in advance for your help.
Best regards,
S. H. Park
