summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--filter/source/pdf/pdfexport.cxx3
-rw-r--r--include/vcl/pdfwriter.hxx4
-rw-r--r--officecfg/registry/schema/org/openoffice/Office/Common.xcs5
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx17
4 files changed, 22 insertions, 7 deletions
diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx
index 9d0971074dcd..b966bf4bde95 100644
--- a/filter/source/pdf/pdfexport.cxx
+++ b/filter/source/pdf/pdfexport.cxx
@@ -699,6 +699,9 @@ bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >&
case 16:
aContext.Version = vcl::PDFWriter::PDFVersion::PDF_1_6;
break;
+ case 17:
+ aContext.Version = vcl::PDFWriter::PDFVersion::PDF_1_7;
+ break;
}
// PDF/UA support
diff --git a/include/vcl/pdfwriter.hxx b/include/vcl/pdfwriter.hxx
index 366cd6714412..8e3c139e8943 100644
--- a/include/vcl/pdfwriter.hxx
+++ b/include/vcl/pdfwriter.hxx
@@ -105,8 +105,8 @@ public:
enum class Orientation { Portrait, Inherit };
- // in case the below enum is added PDF_1_6 PDF_1_7, please add them just after PDF_1_5
- enum class PDFVersion { PDF_1_2, PDF_1_3, PDF_1_4, PDF_1_5, PDF_1_6, PDF_A_1, PDF_A_2, PDF_A_3 };//i59651, PDF/A-1b & -1a, only -1b implemented for now
+ // in case the below enum is added PDF_2_0, please add just after PDF_1_7
+ enum class PDFVersion { PDF_1_2, PDF_1_3, PDF_1_4, PDF_1_5, PDF_1_6, PDF_1_7, PDF_A_1, PDF_A_2, PDF_A_3 };//i59651, PDF/A-1b & -1a, only -1b implemented for now
// for the meaning of DestAreaType please look at PDF Reference Manual
// version 1.4 section 8.2.1, page 475
enum class DestAreaType { XYZ, FitRectangle };
diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index 91436b860c63..9ae5b9117f45 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -5459,6 +5459,11 @@
<desc>PDF 1.6</desc>
</info>
</enumeration>
+ <enumeration oor:value="17">
+ <info>
+ <desc>PDF 1.7</desc>
+ </info>
+ </enumeration>
<enumeration oor:value="1">
<info>
<desc>PDF/A-1 (ISO 19005-1:2005)</desc>
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 2b17a18dd33b..bbb904458627 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -627,11 +627,15 @@ PDFPage::PDFPage( PDFWriterImpl* pWriter, double nPageWidth, double nPageHeight,
switch (m_pWriter->m_aContext.Version)
{
- case PDFWriter::PDFVersion::PDF_1_6:
+ // 1.6 or later
+ default:
m_nUserUnit = std::ceil(std::max(nPageWidth, nPageHeight) / 14400.0);
break;
- default:
- // 1.2 -> 1.5
+ case PDFWriter::PDFVersion::PDF_1_2:
+ case PDFWriter::PDFVersion::PDF_1_3:
+ case PDFWriter::PDFVersion::PDF_1_4:
+ case PDFWriter::PDFVersion::PDF_1_5:
+ case PDFWriter::PDFVersion::PDF_A_1:
break;
}
}
@@ -1298,6 +1302,9 @@ PDFWriterImpl::PDFWriterImpl( const PDFWriter::PDFWriterContext& rContext,
case PDFWriter::PDFVersion::PDF_1_5: aBuffer.append( "1.5" );break;
default:
case PDFWriter::PDFVersion::PDF_1_6: aBuffer.append( "1.6" );break;
+ case PDFWriter::PDFVersion::PDF_A_2:
+ case PDFWriter::PDFVersion::PDF_A_3:
+ case PDFWriter::PDFVersion::PDF_1_7: aBuffer.append( "1.7" );break;
}
// append something binary as comment (suggested in PDF Reference)
aBuffer.append( "\n%\303\244\303\274\303\266\303\237\n" );
@@ -1317,11 +1324,11 @@ PDFWriterImpl::PDFWriterImpl( const PDFWriter::PDFWriterContext& rContext,
m_bIsPDF_A2 = (m_aContext.Version == PDFWriter::PDFVersion::PDF_A_2);
if( m_bIsPDF_A2 )
- m_aContext.Version = PDFWriter::PDFVersion::PDF_1_6; //we could even use 1.7 features
+ m_aContext.Version = PDFWriter::PDFVersion::PDF_1_7;
m_bIsPDF_A3 = (m_aContext.Version == PDFWriter::PDFVersion::PDF_A_3);
if( m_bIsPDF_A3 )
- m_aContext.Version = PDFWriter::PDFVersion::PDF_1_6; //we could even use 1.7 features
+ m_aContext.Version = PDFWriter::PDFVersion::PDF_1_7;
if (m_aContext.UniversalAccessibilityCompliance)
{