vcl/source/gdi/pdfwriter_impl.cxx |   12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

New commits:
commit 9447d96f243011dc688f98c8095e96f36fa34284
Author:     Michael Stahl <michael.st...@allotropia.de>
AuthorDate: Mon Aug 5 14:09:47 2024 +0200
Commit:     Adolfo Jayme Barrientos <fit...@ubuntu.com>
CommitDate: Wed Aug 7 01:21:31 2024 +0200

    tdf#140289 vcl: appease Adobe Acrobat Pro, always produce /Tabs
    
    Reportedly Adobe Acrobat Pro complains if any page is missing "/Tabs"
    even though ISO 14289-1:2014 requires it only for a page with
    annotations.
    
    Change-Id: I84d750da12ca55519aa61c196d2d93aa33f1abad
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171486
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>
    Tested-by: Jenkins
    (cherry picked from commit c9f801f527634a4ec1b5712d345a5ff669e26bbd)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171421
    Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>

diff --git a/vcl/source/gdi/pdfwriter_impl.cxx 
b/vcl/source/gdi/pdfwriter_impl.cxx
index 16b0b5e23501..a2f07b8ff42b 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -775,11 +775,13 @@ bool PDFPage::emit(sal_Int32 nParentObject )
             aLine.append( ((i+1)%15) ? " " : "
" );
         }
         aLine.append( "]
" );
-        if (PDFWriter::PDFVersion::PDF_1_5 <= m_pWriter->m_aContext.Version)
-        {
-            // ISO 14289-1:2014, Clause: 7.18.3
-            aLine.append( "/Tabs/S
" );
-        }
+    }
+    if (PDFWriter::PDFVersion::PDF_1_5 <= m_pWriter->m_aContext.Version)
+    {
+        // ISO 14289-1:2014, Clause: 7.18.3 requires it if there are 
annotations
+        // but Adobe Acrobat Pro complains if it is ever missing so just
+        // write it always.
+        aLine.append( "/Tabs/S
" );
     }
     if( !m_aMCIDParents.empty() )
     {

Reply via email to