filter/source/pdf/impdialog.cxx | 8 ++++++++ filter/source/pdf/pdfexport.cxx | 3 +++ 2 files changed, 11 insertions(+)
New commits: commit 62f8bf1fd379387cafeb616189480976d026224c Author: Michael Stahl <michael.st...@allotropia.de> AuthorDate: Mon Mar 13 18:31:50 2023 +0100 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Tue Mar 14 09:40:03 2023 +0000 filter: PDF export/PDF dialog: PDF/UA requires P bit 10 enabled Adapt dialog and export filter to ensure the bit is set: 7.16 Security An encrypted conforming file shall contain a P key in its encryption dictionary (ISO 32000-1:2008, 7.6.3.2, Table 21). The 10th bit position of the P key shall be true. Change-Id: I2e8e4f5b0ef44efeabf3017f2e12b58914e93520 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148802 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@allotropia.de> diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx index c766c93d5938..4693652292ed 100644 --- a/filter/source/pdf/impdialog.cxx +++ b/filter/source/pdf/impdialog.cxx @@ -1315,12 +1315,20 @@ IMPL_LINK_NOARG(ImpPDFTabSecurityPage, ClickmaPbSetPwdHdl, weld::Button&, void) void ImpPDFTabSecurityPage::enablePermissionControls() { bool bIsPDFASel = false; + bool bIsPDFUASel = false; ImpPDFTabDialog* pParent = static_cast<ImpPDFTabDialog*>(GetDialogController()); ImpPDFTabGeneralPage* pGeneralPage = pParent ? pParent->getGeneralPage() : nullptr; if (pGeneralPage) { bIsPDFASel = pGeneralPage->IsPdfaSelected(); + bIsPDFUASel = pGeneralPage->IsPdfUaSelected(); } + // ISO 14289-1:2014, Clause: 7.16 + if (bIsPDFUASel) + { + mxCbEnableAccessibility->set_active(true); + } + mxCbEnableAccessibility->set_sensitive(!bIsPDFUASel); if (bIsPDFASel) { mxUserPwdPdfa->show(); diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx index 9074a345f809..15d1a577fe47 100644 --- a/filter/source/pdf/pdfexport.cxx +++ b/filter/source/pdf/pdfexport.cxx @@ -708,7 +708,10 @@ bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >& aContext.UniversalAccessibilityCompliance = mbPDFUACompliance; if (mbPDFUACompliance) { + // ISO 14289-1:2014, Clause: 7.1 mbUseTaggedPDF = true; + // ISO 14289-1:2014, Clause: 7.16 + mbCanExtractForAccessibility = true; } // copy in context the values default in the constructor or set by the FilterData sequence of properties