mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
[Annotation] Avoid to encrypt the appearance stream two times (bug 1815476)
This commit is contained in:
parent
c971f4a0a9
commit
ea7b4b4d6c
6 changed files with 34 additions and 19 deletions
|
@ -45,13 +45,13 @@ function writeDict(dict, buffer, transform) {
|
|||
}
|
||||
|
||||
function writeStream(stream, buffer, transform) {
|
||||
writeDict(stream.dict, buffer, transform);
|
||||
buffer.push(" stream\n");
|
||||
let string = stream.getString();
|
||||
if (transform !== null) {
|
||||
string = transform.encryptString(string);
|
||||
}
|
||||
buffer.push(string, "\nendstream");
|
||||
stream.dict.set("Length", string.length);
|
||||
writeDict(stream.dict, buffer, transform);
|
||||
buffer.push(" stream\n", string, "\nendstream");
|
||||
}
|
||||
|
||||
function writeArray(array, buffer, transform) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue