diff options
Diffstat (limited to 'libqpdf')
-rw-r--r-- | libqpdf/QPDFWriter.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libqpdf/QPDFWriter.cc b/libqpdf/QPDFWriter.cc index 7217ded7..99433a16 100644 --- a/libqpdf/QPDFWriter.cc +++ b/libqpdf/QPDFWriter.cc @@ -383,6 +383,14 @@ QPDFWriter::copyEncryptionParameters() { key_len = encrypt.getKey("/Length").getIntValue() / 8; } + if (encrypt.hasKey("/EncryptMetadata") && + encrypt.getKey("/EncryptMetadata").isBool()) + { + this->encrypt_metadata = + encrypt.getKey("/EncryptMetadata").getBoolValue(); + } + QTC::TC("qpdf", "QPDFWriter copy encrypt metadata", + this->encrypt_metadata ? 0 : 1); setEncryptionParametersInternal( V, encrypt.getKey("/R").getIntValue(), |