Skip to content

Commit 28e96cd

Browse files
committed
Document new behavior and how to switch back
1 parent 42a61ce commit 28e96cd

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

docs/user/cropping-and-transforming.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,3 +191,17 @@ writer = PdfWriter()
191191
writer.add_page(page)
192192
writer.write("out-pg-transform.pdf")
193193
```
194+
195+
### pypdf._page.MERGE_CROP_BOX
196+
197+
`pypdf<=3.4.0` used to merge the other page with `trimbox`.
198+
199+
`pypdf>3.4.0` changes this behavior to `cropbox`.
200+
201+
In case anybody has good reasons to use/expect `trimbox`, please let me know via
202+
info@martin-thoma.de or via https://github.com/py-pdf/pypdf/pull/1622
203+
In the mean time, you can add the following code to get the old behavior:
204+
205+
```python
206+
pypdf._page.MERGE_CROP_BOX = "trimbox"
207+
```

0 commit comments

Comments
 (0)