Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let transfer_rotation_to_content affect Annotations #2592

Open
JayBraker opened this issue Apr 9, 2024 · 1 comment
Open

Let transfer_rotation_to_content affect Annotations #2592

JayBraker opened this issue Apr 9, 2024 · 1 comment
Labels
workflow-annotation Everything about annotating PDF files

Comments

@JayBraker
Copy link

Explanation

I read up on a couple of old issues referencing transfer_rotation_to_content as well as Annotations an came to the conclusion that this seems to be an egde-case issue: When applying the page's rotation onto contents, any Annotation will be unaffected - messing up their visual context.

Now I am not entirely literate within the PDF spec but from what I've seen, every annotation contains a Rect?

If this makes sense, I would like to propose/contribute also transforming any annotations accordingly (seems pretty straight forward based on how "/MediaBox", "/CropBox", "/BleedBox", "/TrimBox", "/ArtBox" are transformed).

A little background on our usecase: We are presented a couple PDFs which have been scanned (for some reason a couple of scanners apply 270 degree visual rotations to make the scan look portrait-like) and immediately annotated.
Now as we need to further process the files and add watermarks or similar alterations, it has become painful to align the scan+annotations with any new content.
Amending the transfer_rotation_to_content should be a great relief.

Thank you for looking into this, I would be happy to dedicate my time to making this change happen - I wanted to discuss this issue as maybe there is a good reason why annotations are not transformed right now.

Kind Regards, Josha

@stefan6419846
Copy link
Collaborator

As far as I am aware, only markup annotations have a rectangle, although some might have additional relevant aspects like PolyLine with its vertices. This probably needs to be taken into account as well.

Speaking of transfer_rotation_to_content: Is this the only case where annotation transformations are not supported? What is the current state for the other transformations - do they affect annotations as well and should they affect annotations? Should we enforce this to the user or make this optional?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
workflow-annotation Everything about annotating PDF files
Projects
None yet
Development

No branches or pull requests

2 participants