From 06cbfe71c77cfd61b747b7f80dee37e59cff0118 Mon Sep 17 00:00:00 2001 From: Tomaž Vajngerl Date: Thu, 19 Dec 2019 21:09:24 +0100 Subject: pdf: support for PDF/UA in PDFWriter, write flag to the metadata MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This adds support for PDF/UA to the PDFWriter in form of a bool flag and writes into the XmpMetadata that the document is supposed to be PDF/UA compliant (even if it may not be). Change-Id: If187152d3860397fc629e272c5b3888fca34e790 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85909 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl --- vcl/source/gdi/pdfwriter_impl.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'vcl/source/gdi/pdfwriter_impl.cxx') diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 891d5db93a7b..e55efc180bb3 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -1307,6 +1307,7 @@ void PDFWriterImpl::PDFPage::appendWaveLine( sal_Int32 nWidth, sal_Int32 nY, sal m_nAccessPermissions(0), m_bIsPDF_A1( false ), m_bIsPDF_A2( false ), + m_bIsPDF_UA( false ), m_rOuterFace( i_rOuterFace ) { m_aStructure.emplace_back( ); @@ -5225,7 +5226,7 @@ static void escapeStringXML( const OUString& rStr, OUString &rValue) // emits the document metadata sal_Int32 PDFWriterImpl::emitDocumentMetadata() { - if( !m_bIsPDF_A1 && !m_bIsPDF_A2 ) + if (!m_bIsPDF_A1 && !m_bIsPDF_A2 && !m_bIsPDF_UA) return 0; //get the object number for all the destinations @@ -5240,6 +5241,8 @@ sal_Int32 PDFWriterImpl::emitDocumentMetadata() else if (m_bIsPDF_A2) aMetadata.mnPDF_A = 2; + aMetadata.mbPDF_UA = m_bIsPDF_UA; + if (!m_aContext.DocumentInfo.Title.isEmpty()) { OUString aTempString; -- cgit