Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: allow to pass input file without named argument #2576

Merged
merged 6 commits into from
Apr 14, 2024

Conversation

pubpub-zz
Copy link
Collaborator

Allow the same constructor as PdfReader

Allow the same constructor as PdfReader
@pubpub-zz
Copy link
Collaborator Author

@stefan6419846 / @MartinThoma / @MasterOdin

The current call is kept. What do you think of this proposal ?

Copy link

codecov bot commented Apr 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.90%. Comparing base (ced67e1) to head (6ebf75f).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2576      +/-   ##
==========================================
+ Coverage   94.89%   94.90%   +0.01%     
==========================================
  Files          50       50              
  Lines        8301     8320      +19     
  Branches     1663     1668       +5     
==========================================
+ Hits         7877     7896      +19     
  Misses        263      263              
  Partials      161      161              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@stefan6419846
Copy link
Collaborator

As long as it is backwards-compatible and does not cause unnecessary overhead while making it more intuitive when using the reader and writer, there is nothing which would speak against this from my side.

@pubpub-zz
Copy link
Collaborator Author

@MartinThoma / @MasterOdin
any opinion?

pypdf/_writer.py Outdated Show resolved Hide resolved
MartinThoma
MartinThoma previously approved these changes Apr 14, 2024
@MartinThoma
Copy link
Member

Fine for me 👍

Maybe something similar to my comment could make the code a bit easier to read?

Co-authored-by: Martin Thoma <[email protected]>
@stefan6419846 stefan6419846 merged commit eb6b21c into py-pdf:main Apr 14, 2024
16 checks passed
stefan6419846 added a commit that referenced this pull request Jun 23, 2024
## What's new

### New Features (ENH)
- Accept ETen-B5 and UniCNS-UTF16 encodings (#2721) by @pubpub-zz
- Add decode_as_image() to ContentStreams (#2615) by @pubpub-zz
- context manager for PdfReader (#2666) by @tibor-reiss
- Add capability to set font and size in fields (#2636) by @pubpub-zz
- Allow to pass input file without named argument (#2576) by @pubpub-zz

### Bug Fixes (BUG)
- Fix deprecation for Ressources when using old constants (#2705) by @stefan6419846
- Fix images issue 4 bits encoding and LUT starting with UTF16_BOM (#2675) by @pubpub-zz
- Reading large compressed images takes huge time to process (#2644) by @snanda85
- Highlighted Text Cannot Be Printed (#2604) by @Nifury
- Fix UnboundLocalError on malformed pdf (#2619) by @farjasju

### Documentation (DOC)
- Various improvements on docstrings and examples by @j-t-1

### Robustness (ROB)
- Cope with missing Standard 14 fonts in fields (#2677) by @pubpub-zz
- Improve inline image extraction (#2622) by @pubpub-zz
- Cope with loops in Fields tree (#2656) by @pubpub-zz
- Discard /I in choice fields for compatibility with Acrobat (#2614) by @pubpub-zz
- Cope with some issues in pillow (#2595) by @pubpub-zz
- Cope with some image extraction issues (#2591) by @pubpub-zz

### Maintenance (MAINT)
- Deprecate interiour_color with replacement interior_color (#2706) by @j-t-1
- Add deprecate_with_replacement to PdfWriter.find_bookmark (#2674) by @j-t-1

### Code Style (STY)
- Change Link to be a non-markup annotation (#2714) by @j-t-1

[Full Changelog](4.2.0...4.3.0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants