summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2018-04-24 09:57:00 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2018-04-27 15:41:42 +0200
commit99ac4ee05b039166eedfe361fb985682fd92dd13 (patch)
tree61dfdb92f01158e4e0dd36a99d71c2d763571a4a /vcl
parentc5bc0e202a03b573b9be94b65209cd9927d48fcc (diff)
Change default PDF version to 1.5
According to Miklos Vajna, we already write markup which is newer than 1.4, but the PDF version was not changed. Printing still sets the version to 1.4, not sure if we should update it or keep the old version. Change-Id: I5387fba03a3ee33f18e16033f630f1b765e3df8f Reviewed-on: https://gerrit.libreoffice.org/53373 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/filter/ipdf/pdfread.cxx8
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx2
2 files changed, 5 insertions, 5 deletions
diff --git a/vcl/source/filter/ipdf/pdfread.cxx b/vcl/source/filter/ipdf/pdfread.cxx
index 2eab3e887d6c..31d24cc89701 100644
--- a/vcl/source/filter/ipdf/pdfread.cxx
+++ b/vcl/source/filter/ipdf/pdfread.cxx
@@ -144,7 +144,7 @@ bool isCompatible(SvStream& rInStream, sal_uInt64 nPos, sal_uInt64 nSize)
sal_Int32 nMajor = OString(aFirstBytes[5]).toInt32();
sal_Int32 nMinor = OString(aFirstBytes[7]).toInt32();
- return !(nMajor > 1 || (nMajor == 1 && nMinor > 4));
+ return !(nMajor > 1 || (nMajor == 1 && nMinor > 5));
}
/// Takes care of transparently downgrading the version of the PDF stream in
@@ -159,7 +159,7 @@ bool getCompatibleStream(SvStream& rInStream, SvStream& rOutStream, sal_uInt64 n
rOutStream.WriteStream(rInStream, nSize);
else
{
- // Downconvert to PDF-1.4.
+ // Downconvert to PDF-1.5.
FPDF_LIBRARY_CONFIG aConfig;
aConfig.version = 2;
aConfig.m_pUserFontPaths = nullptr;
@@ -178,8 +178,8 @@ bool getCompatibleStream(SvStream& rInStream, SvStream& rOutStream, sal_uInt64 n
return false;
CompatibleWriter aWriter;
- // 14 means PDF-1.4.
- if (!FPDF_SaveWithVersion(pPdfDocument, &aWriter, 0, 14))
+ // 15 means PDF-1.5.
+ if (!FPDF_SaveWithVersion(pPdfDocument, &aWriter, 0, 15))
return false;
FPDF_CloseDocument(pPdfDocument);
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index a61d26235976..a4766f502751 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -1801,8 +1801,8 @@ void PDFWriterImpl::PDFPage::appendWaveLine( sal_Int32 nWidth, sal_Int32 nY, sal
case PDFWriter::PDFVersion::PDF_1_2: aBuffer.append( "1.2" );break;
case PDFWriter::PDFVersion::PDF_1_3: aBuffer.append( "1.3" );break;
case PDFWriter::PDFVersion::PDF_A_1:
- default:
case PDFWriter::PDFVersion::PDF_1_4: aBuffer.append( "1.4" );break;
+ default:
case PDFWriter::PDFVersion::PDF_1_5: aBuffer.append( "1.5" );break;
}
// append something binary as comment (suggested in PDF Reference)