mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-01-13 08:42:52 +01:00
Security handler fix: if metadata are not encrypted, encryption produces invalid PDF document
This commit is contained in:
parent
c92120c48c
commit
be753b2965
@ -2025,6 +2025,8 @@ PDFSecurityHandlerPointer PDFSecurityHandlerFactory::createSecurityHandler(const
|
||||
}
|
||||
}
|
||||
|
||||
handler->m_filterDefault.encryptMetadata = settings.encryptContents == All;
|
||||
|
||||
switch (settings.encryptContents)
|
||||
{
|
||||
case All:
|
||||
@ -2050,8 +2052,6 @@ PDFSecurityHandlerPointer PDFSecurityHandlerFactory::createSecurityHandler(const
|
||||
break;
|
||||
}
|
||||
|
||||
handler->m_filterDefault.encryptMetadata = settings.encryptContents == All;
|
||||
|
||||
if (standardHandler)
|
||||
{
|
||||
handler->m_cryptFilters["StdCF"] = handler->m_filterDefault;
|
||||
|
Loading…
Reference in New Issue
Block a user