Skip to content

BUG: Let Page.scale also scale the crop-/trim-/bleed-/artbox#1066

Merged
MartinThoma merged 2 commits intomainfrom
doc-scale
Jul 9, 2022
Merged

BUG: Let Page.scale also scale the crop-/trim-/bleed-/artbox#1066
MartinThoma merged 2 commits intomainfrom
doc-scale

Conversation

@MartinThoma
Copy link
Copy Markdown
Member

Closes #272

@MartinThoma
Copy link
Copy Markdown
Member Author

I'm unclear if all of the other boxes should be scaled as well. I think so. Is there any reason not to do tha?

@codecov
Copy link
Copy Markdown

codecov bot commented Jul 6, 2022

Codecov Report

Merging #1066 (f441de0) into main (a345690) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1066      +/-   ##
==========================================
+ Coverage   90.86%   90.87%   +0.01%     
==========================================
  Files          24       24              
  Lines        4508     4514       +6     
  Branches      920      920              
==========================================
+ Hits         4096     4102       +6     
  Misses        271      271              
  Partials      141      141              
Impacted Files Coverage Δ
PyPDF2/_page.py 92.58% <100.00%> (+0.07%) ⬆️
PyPDF2/generic.py 91.25% <100.00%> (+0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a345690...f441de0. Read the comment docs.

@MartinThoma
Copy link
Copy Markdown
Member Author

changes

@MartinThoma MartinThoma force-pushed the doc-scale branch 2 times, most recently from 5db7d0a to ec43342 Compare July 6, 2022 18:03
Closes #272

Co-authored-by: Brian Painter <brianpainter@tindallcorp.com>
@MartinThoma MartinThoma changed the title BUG: Page.scale now also scales the cropbox BUG: Page.scale now also scales the crop-/bleed-/artbox Jul 6, 2022
@MartinThoma MartinThoma added the is-bug From a users perspective, this is a bug - a violation of the expected behavior with a compliant PDF label Jul 6, 2022
@MartinThoma MartinThoma changed the title BUG: Page.scale now also scales the crop-/bleed-/artbox BUG: Let Page.scale also scale the crop-/bleed-/artbox Jul 9, 2022
@MartinThoma MartinThoma changed the title BUG: Let Page.scale also scale the crop-/bleed-/artbox BUG: Let Page.scale also scale the crop-/trim-/bleed-/artbox Jul 9, 2022
@MartinThoma MartinThoma merged commit 8edaca8 into main Jul 9, 2022
@MartinThoma MartinThoma deleted the doc-scale branch July 9, 2022 11:50
MartinThoma added a commit that referenced this pull request Jul 10, 2022
New Features (ENH):
-  Add PageObject._get_fonts (#1083)
-  Add support for indexed color spaces / BitsPerComponent for decoding PNGs (#1067)

Performance Improvements (PI):
-  Use iterative DFS in PdfWriter._sweep_indirect_references (#1072)

Bug Fixes (BUG):
-  Let Page.scale also scale the crop-/trim-/bleed-/artbox (#1066)
-  Column default for CCITTFaxDecode (#1079)

Robustness (ROB):
-  Guard against None-value in _get_outlines (#1060)

Documentation (DOC):
-  Stamps and watermarks (#1082)
-  OCR vs PDF text extraction (#1081)
-  Python Version support
-  Formatting of CHANGELOG

Developer Experience (DEV):
-  Cache downloaded files (#1070)
-  Speed-up for CI (#1069)

Maintenance (MAINT):
-  Set page.rotate(angle: int) (#1092)
-  Issue #416 was fixed by #1015 (#1078)

Testing (TST):
-  Image extraction (#1080)
-  Image extraction (#1077)

Code Style (STY):
-  Apply black
-  Typo in Changelog

Full Changelog: 2.4.2...2.4.3
@BrianPainter
Copy link
Copy Markdown
Contributor

@MartinThoma this looks like a good improvement. I'm not an expert on PDFs and the different boxes, but I used this guide previously to try and understand them: https://www.prepressure.com/pdf/basics/page-boxes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

is-bug From a users perspective, this is a bug - a violation of the expected behavior with a compliant PDF

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants