pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tilman Hausherr <THaush...@t-online.de>
Subject Re: stamp annotation in pdf page 270 degree rotation incorrectly disdplayed
Date Sun, 14 Jan 2018 09:46:25 GMT
I'm lazy. Please include the pom.xml parts for the batik component(s) 
you're using, and FileUtils. Or change the code so that it loads the 
image instead of the SVG file.


Am 14.01.2018 um 02:52 schrieb chitgoks:
> hi. i have a question on stamps getting displayed in a pdf page that is of
> 270 degree rotation
> i use batik to convert svg to a BufferedImage object
> please see source files
> svg file  -
> https://drive.google.com/open?id=16WmOTp-9ReIhmsld7kU5N5VUevPF7duP
> java file -
> https://drive.google.com/open?id=12TUQIgx5eGy4JGuwCVeizEEH8lWXPHTZ
> src pdf - https://drive.google.com/open?id=19dBD31kGDGpLOGS8zVwyIH1wkM7nkTXN
> i copied the sample source code for rubber stamp appearance stream. i use
> form.setMatrix(AffineTransform.getRotateInstance(Math.toRadians(pageRotation)));
> to rotate the image 270 degrees and it displays right. however, when i
> resize, it rotates back to 90/180(not sure what degree this is) degrees and
> the bounding box becomes a vertical rectangle instead of a horizontal
> rectangle.
> also, the rotation handle is on the left side in acrobat instead of it
> being at the top (though, in itext code resizing and moving the stamp
> annotation will not change it orientation and size, using an ImageTemplate,
> but rotation handle is also on the left side), though this part is not
> important. i am more concerned on when the annotation gets moved or
> resized, and its orientation and size gets swapped instead of preserving it.
> maybe in pdfbox, the issue of my code is somewhere in the form object?
> if anyone has time to check the source code, thank you.

To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org

View raw message