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

6.2.0 Preview 2 cannot read certain files #217

Open
packdat opened this issue Dec 12, 2024 · 2 comments
Open

6.2.0 Preview 2 cannot read certain files #217

packdat opened this issue Dec 12, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@packdat
Copy link

packdat commented Dec 12, 2024

Testing the latest version 6.2.0 Preview 2 with my list of test-files, i observed some small issues that prevented the library from reading certain files.

  • When reading objects from object-streams, you create instances of PdfObjectStream and Parser to read objects from the stream.
    This can fail when the stream is compressed with the deflate-filter, because you use objectStream.Stream.Value instead of objectStream.Stream.UnfilteredValue. Instances of this here and here.
  • There are files out there, where an object is referenced in more than one object-stream.
    This causes an exception here because you try to add an already added object-id to the dictionary.

I attached a ZIP containing 2 documents which could not be read by the library because of the mentioned issues.
Tests were performed with my usual test-case (mentioned for example in #152 )

Issue_Documents.zip

Out of curiosity:
What kind of tests do you run before pushing a new version ?
If you're not doing this already, i highly suggest collection a bunch of files and running a simple import-test against them.
(like the one in #152 )
The issues described here would immediately pop up.

@StLange
Copy link
Member

StLange commented Jan 10, 2025

The bugs will be fixed in the next release (6.2.0 Preview 3).

Out of curiosity

We have an internal repository PDFsharp.Tests where we test all ever submitted PDFfiles which have issues with PDFsharp. Periodically and before each release we use it to ensure that all issues ever fixed with reading PDF files are still fixed. Unfortunately, we did something wrong with some of the unit tests. So, we overlooked some issues. Should work correctly in the next release.

@packdat
Copy link
Author

packdat commented Jan 11, 2025

Great news, thank you ! 👍

@ThomasHoevel ThomasHoevel added the bug Something isn't working label Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants