Describe the bug
It is possible to have pdf where the origin is not bottom left. For example, I have a pdf with centred origin. The raw mediabox is (-100, -200, 100, 200) and the resulting bbox in pdfplumber is (-100, 200, 100, 600).
Expected behaviour
Following pdfplumber convention (origin at top left), bbox should be (0, 0, 200, 400), with all the content in the right system.
Actual behaviour
If we have raw bounding box
- x0_r=-100
- y0_r=-200
- x1_r=100
- y1_r=200
We get that the page bbox is
- x0 = x0_r = -100
- y0 = -y0_r = 200
- x1 = x1_r = 100
- y1 = (y1_r - y0_r) - y0_r = 600
Screenshots
Environment
- pdfplumber version: 0.11.5
- Python version: 3.11.13
- OS: Mac
Describe the bug
It is possible to have pdf where the origin is not bottom left. For example, I have a pdf with centred origin. The raw mediabox is (-100, -200, 100, 200) and the resulting bbox in pdfplumber is (-100, 200, 100, 600).
Expected behaviour
Following pdfplumber convention (origin at top left), bbox should be (0, 0, 200, 400), with all the content in the right system.
Actual behaviour
If we have raw bounding box
We get that the page bbox is
Screenshots
Environment