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 11:56:29 GMT
I looked at the file AnnotationSample.Standard.pdf (google for it) and 
it has many stamps... They do also have the problem with the "X" except 
on standard stamps.

I saw a "Rotate" entry in the dictionaries. Changing it changes the 
handle. This must be something non standard, i.e. for Adobe only.

stampAnnot.getCOSObject().setItem(COSName.ROTATE, COSInteger.get(270));

Tilman

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


Mime
View raw message