Conversation
align with the behavior of pdfbox and c implementations where single character final blocks are ignored rather than being written. also makes the error more informative in case it is ever encountered again. add more test cases. it is possible this is hiding the problem and will move the error elsewhere but this matches the implementation behavior of the 2 reference implementations. one other potential source for the error is if pdf supports '<~' as a start of data marker which i can't find in the spec but wikipedia says might be possible? without documents to trigger the error i think this is the best fix for now
BobLd
approved these changes
Jul 9, 2025
|
I can confirm that issue #782 has not been resolved yet. I’m currently using version 0.1.10 and I’m getting the same exception.
I provide the problematic PDF in order to be able to test it. |
Collaborator
|
@RikanoAlienaris the issue you are facing should be fixed, but not in 0.1.10 Can you try with the latest pre-release version? |
|
You're absolutely right, I didn't realize it wasn't a stable version yet. It does look like the issue is resolved now. Sorry about that. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


thanks for the reviews @BobLd, I'm not sure how long I'm back for but have a little motivation again at the moment
this change attempts a fix for #782 but without reference documents I'm not certain this is the actual fix
this aligns our decoder with the behavior of pdfbox and c (https://github.com/dcurrie/ascii85/tree/master) implementations where single character final blocks are ignored rather than being written. also makes the error more informative in case it is ever encountered again.
also adds more test cases for ASCII85.
it is possible this is hiding the problem and will move the error elsewhere but this matches the implementation behavior of the 2 reference implementations.
one other potential source for the error is if pdf supports '<~' as a start of data marker which i can't find in the spec but wikipedia says might be possible? https://en.wikipedia.org/wiki/Ascii85#Adobe_version however the source for this is a single implementation in a language I don't understand.
without documents to trigger the error i think this is the best fix for now