PDF annotations shift when MediaBox + Rotate differ #3566
Replies: 2 comments 1 reply
-
|
Please provide more information, especially the code you use and corresponding example PDF files. Have you tried moving the page rotation from the metadata to the actual content stream using |
Beta Was this translation helpful? Give feedback.
-
|
I like the ` from pathlib import Path src = Path(r"C:\development\rotate\G101.pdf") reader = PdfReader(str(src)) with out.open('wb') as f: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I’m copying Bluebeam markups (PDF annotations) from an original PDF to a revised PDF, matching pages by page/sheet label. This works only if the page coordinate systems match.
Example
Original page: MediaBox 1584×2448, /Rotate=270. Revised page: MediaBox 2448×1584, /Rotate=0. They look identical on screen, but copied annotations shift because annotation coordinates are defined in MediaBox space(I hink) and /Rotate is viewer-only.
Goal
Normalize the revised page before copying annotations:
Question
What’s the correct way to transform a page’s content stream so MediaBox + /Rotate changes don’t break annotation placement?
Beta Was this translation helpful? Give feedback.
All reactions