Skip to content

Conversation

@stefan6419846
Copy link
Collaborator

Closes #3391.

According to table 29 of the PDF 2.0 specification, the Metadata stream inside the catalog dictionary should be an indirect reference. The old code would inline the content stream into the catalog dictionary, making the file unreadable in some applications like some versions of Adobe Acrobat.

Closes py-pdf#3391.

According to table 29 of the PDF 2.0 specification, the Metadata stream
inside the catalog dictionary should be an indirect reference. The old
code would inline the content stream into the catalog dictionary, making
the file unreadable in some applications like some versions of Adobe
Acrobat.
@codecov
Copy link

codecov bot commented Jul 22, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.94%. Comparing base (c17f03a) to head (3f3ea31).
⚠️ Report is 52 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3392      +/-   ##
==========================================
+ Coverage   96.91%   96.94%   +0.03%     
==========================================
  Files          55       55              
  Lines        9324     9333       +9     
  Branches     1706     1708       +2     
==========================================
+ Hits         9036     9048      +12     
+ Misses        172      170       -2     
+ Partials      116      115       -1     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@stefan6419846 stefan6419846 merged commit 0b64266 into py-pdf:main Jul 22, 2025
16 checks passed
@stefan6419846 stefan6419846 deleted the issue3391 branch July 22, 2025 12:10
stefan6419846 added a commit that referenced this pull request Jul 27, 2025
## What's new

### New Features (ENH)
- Automatically preserve links in added pages (#3298) by @larsga
- Allow writing/updating all properties of an embedded file (#3374) by @Arya-A-Nair

### Bug Fixes (BUG)
- Fix XMP handling dropping indirect references (#3392) by @stefan6419846

### Robustness (ROB)
- Deal with DecodeParms being empty list (#3388) by @stefan6419846

### Documentation (DOC)
- Document how to read and modify XMP metadata (#3383) by @stefan6419846

[Full Changelog](5.8.0...5.9.0)
OpenNingia pushed a commit to OpenNingia/pypdf that referenced this pull request Oct 23, 2025
## What's new

### New Features (ENH)
- Automatically preserve links in added pages (py-pdf#3298) by @larsga
- Allow writing/updating all properties of an embedded file (py-pdf#3374) by @Arya-A-Nair

### Bug Fixes (BUG)
- Fix XMP handling dropping indirect references (py-pdf#3392) by @stefan6419846

### Robustness (ROB)
- Deal with DecodeParms being empty list (py-pdf#3388) by @stefan6419846

### Documentation (DOC)
- Document how to read and modify XMP metadata (py-pdf#3383) by @stefan6419846

[Full Changelog](py-pdf/pypdf@5.8.0...5.9.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.

Accessing XMP metadata in PdfWriter breaks PDF file for Adobe Acrobat

1 participant