Skip to content

Fix issue 926#1072

Merged
BobLd merged 2 commits intomasterfrom
fix-issue-926
Jul 6, 2025
Merged

Fix issue 926#1072
BobLd merged 2 commits intomasterfrom
fix-issue-926

Conversation

@EliotJones
Copy link
Copy Markdown
Member

the file provided in issue #926 contains the following syntax
in pdf object streams:

% 750 0 obj
<< >>

currently we read the comment token and skip the rest
however this producer is writing nonsense to the stream.
comment tokens are only valid outside streams in pdf files
so we align to the behavior of pdfbox here by skipping the
entire line containing a comment inside a stream which fixes
parsing this file.

the file provided in issue #926 contains the following syntax
in pdf object streams:

```
% 750 0 obj
<< >>
```

currently we read the comment token and skip the rest
however this producer is writing nonsense to the stream.
comment tokens are only valid outside streams in pdf files
so we align to the behavior of pdfbox here by skipping the
entire line containing a comment inside a stream which fixes
parsing this file.
@EliotJones EliotJones requested a review from BobLd July 5, 2025 21:08
@BobLd BobLd merged commit f099dd5 into master Jul 6, 2025
2 checks passed
@BobLd BobLd deleted the fix-issue-926 branch July 6, 2025 06:14
@BobLd
Copy link
Copy Markdown
Collaborator

BobLd commented Jul 6, 2025

@EliotJones great to see you around, thanks a lot for the fix!

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.

2 participants