Please try this:
replace
if (br2 + br3 > incrementalInput.length())
with
if (br2 > incrementalInput.length())
Why? The initial file has this ( https://ibb.co/848FvxHF):
However you told "the unsigned file is 144951 bytes long". So the UR3
signature was already bad. Looking at index 2 would help.
Tilman
Am 17.09.2025 um 13:25 schrieb Tilman Hausherr:
You should also look at the place where reachedSignature is set to
true. I added a log output there, it would be interesting to see what
you get for byteRange.
Looking at that place again, I wonder if we should also look at the
value of "br2". It should be higher than the length of the file.
Ideally the output should be
byteRange: COSArray{[COSInt{0}, COSInt{1000000000},
COSInt{1000000000}, COSInt{1000000000}]
anything else is wrong.
Tilman
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: users-h...@pdfbox.apache.org