kpuchalski / alivepdf

Automatically exported from code.google.com/p/alivepdf
0 stars 0 forks source link

image x & y is diff in 1.5 #226

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. add image via version earlier than 1.5
2. upgrade to 1.5 and modify addImage() call
3. add image 

What is the expected output? What do you see instead?
I expected to see the image at the same x/y position, but it has shifted to
the right and down. 

What version of the product are you using? On what operating system?
Using AlivePDF 1.5, Windows 7

Please provide any additional information below.
When I compare the values passed to setXY() in PDF.as, they are the same.

Original issue reported on code.google.com by chris.fa...@gmail.com on 16 Apr 2010 at 4:01

GoogleCodeExporter commented 9 years ago
I have the same issue in 1.5
I'm using addImageStream(), and image is shifted down and right
All other stuff I'm using are positioned like it should

As a unit in pdf using Unit.POINT 
myPDF = new PDF ( Orientation.PORTRAIT, Unit.POINT, Size.A4);

Original comment by my.madz....@gmail.com on 6 May 2010 at 8:11

GoogleCodeExporter commented 9 years ago
Possible solution
myPDF.setMargins(0,0);

After I've done that, looks like image is position like it should
Strange that other features like drawRect is positioned ok anyway

Original comment by my.madz....@gmail.com on 6 May 2010 at 8:30

GoogleCodeExporter commented 9 years ago
Hi,

Yes, since 1.5, the image API's (addImage, addImageStream, etc.) respect the 
margin
value. Just call setMargins yes, and set it to 0 if you want to reproduce the 
former
behavior.

best,

Thibault

Original comment by thibault.imbert on 9 May 2010 at 4:00