Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Feb 15, 2025

This PR contains the following updates:

Package Type Update Change
lopdf dependencies minor 0.34.0 -> 0.38.0

Release Notes

J-F-Liu/lopdf (lopdf)

v0.38.0

Add
  • Add enhanced PDF decryption support for encrypted documents with empty passwords
  • Add automatic decryption during document loading for better pdftk compatibility
  • Add raw object extraction before parsing to handle encrypted content
  • Add support for decrypting PDFs with compressed object streams
  • Add comprehensive test suite for PDF decryption functionality
  • Add assets/encrypted.pdf test file for decryption testing
  • Add examples demonstrating decryption capabilities (test_decryption.rs, verify_decryption.rs)
Enhance
  • Enhance Reader::read() to detect and handle encrypted PDFs automatically
  • Enhance document loading to attempt empty password authentication by default
  • Enhance object processing to decrypt objects after parsing
  • Enhance support for encrypted PDFs containing object streams
Fix
  • Fix encrypted object parsing by extracting raw bytes before decryption
  • Fix object stream handling in encrypted documents
  • Fix decryption workflow to match pdftk's approach
Implementation Details
  • Modified src/reader.rs to add load_encrypted_document() method
  • Added extract_raw_object() method for raw byte extraction
  • Added parse_raw_object() method for parsing extracted bytes
  • Store raw object bytes in Reader::raw_objects field for deferred decryption
  • Process compressed objects from object streams after decryption

v0.37.0

Add
  • Add complete PDF object streams write support enabling 11-61% file size reduction (#XXX)
  • Add save_modern() method for easy object streams and cross-reference streams usage
  • Add SaveOptions struct with builder pattern for configuring compression settings
  • Add ObjectStreamBuilder for creating object streams programmatically
  • Add cross-reference stream support for PDF 1.5+ compliance
  • Add replace_partial_text() function for partial text replacement in PDFs
  • Add comprehensive test suite with 50+ tests for object streams functionality
  • Add object streams write capability (previously read-only)
  • Add implementation documentation in OBJECT_STREAMS_IMPLEMENTATION.md
Fix
  • Fix pdfutil build error - missing derive feature for clap dependency
  • Fix async feature compilation - 25 examples/tests failing with --all-features
  • Fix 31 clippy linting errors blocking CI with #![deny(clippy::all)]
  • Fix object compression eligibility - structural objects (Catalog, Pages, Page) now properly compressed
  • Fix trailer-referenced objects compression - only encryption dictionary excluded from compression
  • Fix linearization detection for proper Catalog handling per PDF specification
  • Fix compilation warnings
Update
  • Update to Rust 2024 edition with minimum Rust 1.85 requirement
Maintain
  • Maintain full backward compatibility - all existing APIs unchanged

v0.36.0

Add
  • Add support for Revision 5 (#​401)
  • Add more checks to the encryption/decryption logic (#​399)
  • Add sanity checks for PDF encryption, add examples for decrypting/encrypting PDF files and various bug fixes (#​397)
  • Add encrypt function to crypt filters
  • Add support for jiff and make both chrono and time optional features
Avoid
  • Avoid parsing encrypted object streams early and correctly parse object streams upon decryption (#​385)
  • Avoid decrypting cross-reference streams (#​381)
Check
  • Check if the security handler is the standard one
Clarify
  • Clarify datetime parsing logic using the PDF specification
Compute
  • Compute the file encryption key (revision 6)
Declare
  • Declare and implement crypt filters
Ensure
  • Ensure the document is actually encrypted
Fix
  • Fix unused imports
  • Fix warning for rotate example
  • Fix warnings about nom_parser
  • Fix clippy warning about operator precedence
  • Fix typo in comment
Gracefully
  • Gracefully handle the is_aes check without throwing errors (#​376)
Handle
  • Handle cases where the stream objects override the crypt filter
Implement
  • Implement Document::encrypt() (#​396)
  • Implement password authentication (revision 6)
  • Implement decrypt with and without password sanitization
  • Implement authentication functions
  • Implement password sanitization from string
  • Implement password algorithms 2-7
  • Implement encrypt_object function
  • Implement and use PKCS#​5 padding instead
  • Implement function to parse the available crypt filters
  • Implement 256-bit AES-CBC crypt filter
  • Implement TryFrom rather than TryInto
Improve
  • Improve the AES decryption with some sanity checks (#​383)
Merge
  • Merge remaining algorithms functions into PasswordAlgorithm implementation
Missing
  • Missing import to test
Only
  • Only encode EncryptMetadata when V >= 4 (#​400)
Provide
  • Provide revision-agnostic functions for the password algorithms
Randomly
  • Randomly generate file encryption key for V5 in encrypt example (#​403)
Recurse
  • Recurse into arrays and dictionaries to fully decrypt all strings/streams (#​378)
Release
  • Release 0.36
Remove
  • Remove the old implementation
  • Remove workflow that used to enable the nom_parser feature
  • Remove nom_parser feature
Reorganize
  • Reorganize encryption code
Sanitize
  • Sanitize passwords (revision 6)
Try
  • Try decrypting with an empty password
Unpack
  • Unpack objects after decrypting object streams (#​382)
Update
  • Update to nom 8.0 and nom_locate 5.0 (#​402)
Update
  • update changelog
Use
  • Use a hasher instead of allocating a Vec
  • Use the new implementation to compute the file encryption key
  • Use the default stream and string crypt filter if present
  • Use Unix epoch if time feature is not enabled
  • Use get_deref for the Kids array to handle indirect references (#​379)
Validate
  • Validate encryption dictionary for revision 5 (#​405)
Validate
  • validate binary comment during parsing (#​392)

v0.35.0

Compare Source

Add
  • Add test for supported color types in PDF image embedding
  • Add function for text chunks extraction. (#​342)
Added
  • added binary comment as attribute and for load and write. Binary Comment is gonna be important for pdf in A/2, A/3 format. (#​370)
Allow
  • Allow parsing off-spec PDF files with prefixes before the header (#​362)
Also
  • Also accept ASCII85 streams without EOD marker (#​354)
Fix
  • Fix clippy warning
  • Fix incorrect image data handling in PDF content stream
  • Fix BitsPerComponent calculation and improper ColorSpace mapping
  • Fix incorrect color type detection for JPEG images
  • Fix mulitplication overflow in ascii85 decode (#​348)
  • Fix out of memory bug (#​347)
  • Fix addition overflow (#​346)
  • Fix lowercase s of Procset and no space target string(J-F-Liu#​323) (#​324)
Ignore
  • Ignore space after byte index of startxref (#​371)
Implement
  • Implement ToUnicode for variadic len encodings (#​328)
Improve
  • Improve JPEG processing efficiency by avoiding unnecessary decode (#​345)
  • Improve cmap parsing and internal error handling (#​335)
Inline
Keep
  • keep existing values when extending dictionary (#​322)
Properly
  • Properly support document prefixes (#​365)
Refactor
  • Refactor and optimize image processing logic in xobject.rs
Release
  • Release 0.35
Remove
  • remove misleading Object::as_string (#​350)
Remove
  • Remove superfluous ref keyword (#​361)
  • Remove pom parser (#​355)
  • Remove /Prev from trailer (#​333)
Replace
  • Replace debug assert with Result (#​349)
  • Replace unwrap with error handling (#​351)
Rework
Specify
  • Specify minimum Rust version in Cargo.toml (#​320)
Support
  • Support UTF-16 encoding for bookmark titles with non-ASCII characters (#​364)
  • Support AES encryption and revision 4 (#​343)
Throw
  • Throw error if xref stream cannot be uncompressed (#​339)
Update
  • update changelog

Configuration

📅 Schedule: Branch creation - "after 1am every 3 weeks on Saturday" in timezone America/Los_Angeles, Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot changed the title fix(deps): update rust crate lopdf to 0.35.0 fix(deps): update rust crate lopdf to 0.36.0 Mar 15, 2025
@renovate renovate bot force-pushed the renovate/lopdf-0.x branch from 736797b to 80c55e6 Compare March 15, 2025 18:51
@renovate renovate bot force-pushed the renovate/lopdf-0.x branch 2 times, most recently from 299becc to 087a420 Compare August 15, 2025 09:33
@renovate renovate bot changed the title fix(deps): update rust crate lopdf to 0.36.0 fix(deps): update rust crate lopdf to 0.37.0 Aug 15, 2025
@renovate renovate bot force-pushed the renovate/lopdf-0.x branch from 087a420 to 349a92c Compare August 31, 2025 09:08
@renovate renovate bot changed the title fix(deps): update rust crate lopdf to 0.37.0 fix(deps): update rust crate lopdf to 0.38.0 Aug 31, 2025
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.

1 participant