Fix stream use when getting the text (follow-up of #20373)

This commit is contained in:
Calixte Denizet 2025-10-18 22:58:27 +02:00
parent b0e8c39f31
commit 199b3d04df

View File

@ -4284,7 +4284,7 @@ class PartialEvaluator {
hash.update(`${firstChar}-${lastChar}`); // Fixes issue10665_reduced.pdf
if (toUnicode instanceof BaseStream) {
const stream = toUnicode.str || toUnicode;
const stream = toUnicode.stream || toUnicode;
const uint8array = stream.buffer
? new Uint8Array(stream.buffer.buffer, 0, stream.bufferLength)
: new Uint8Array(