pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chitgoks <chitg...@gmail.com>
Subject stamp annotation in pdf page 270 degree rotation incorrectly disdplayed
Date Sun, 14 Jan 2018 01:52:55 GMT
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.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message