Skip to content

Commit

Permalink
Document new behavior and how to switch back
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinThoma committed Feb 11, 2023
1 parent 42a61ce commit 28e96cd
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/user/cropping-and-transforming.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,3 +191,17 @@ writer = PdfWriter()
writer.add_page(page)
writer.write("out-pg-transform.pdf")
```

### pypdf._page.MERGE_CROP_BOX

`pypdf<=3.4.0` used to merge the other page with `trimbox`.

`pypdf>3.4.0` changes this behavior to `cropbox`.

In case anybody has good reasons to use/expect `trimbox`, please let me know via
[email protected] or via https://github.com/py-pdf/pypdf/pull/1622
In the mean time, you can add the following code to get the old behavior:

```python
pypdf._page.MERGE_CROP_BOX = "trimbox"
```

0 comments on commit 28e96cd

Please sign in to comment.