PDF/X-4 is a subset of PDF 1.6, aimed at printing fidelity. We can support it with a few refactorings of the existing code in QPdfEngine. * Add the new PDF version to QPagedPaintDevice / QPdfEngine. * Always write the XMP metadata, no matter what's the PDF version used. XMP used to be written only for PDF/A-1b, but it's supported by PDF 1.4 and 1.6 so there's little reason not to write it. * While at it, ditch the search&replace approach for the metadata and use QXmlStreamWriter instead, since it gives us extra flexibility that we need (emit different tags depending on the PDF version in use). * The old code had a bug where the timestamps in the XMP metadata and the document information dictionary could fall out of sync. Just use one datetime object in both places. * Add /ModDate and xmp:ModifyDate (required). * Add the required attributes in the xmpMM namespace. * Add a way to set the document ID to a custom UUID, and use it in the XMP metadata as well as in the /ID in the trailer. Emit the ID unconditionally, as it's been available since PDF 1.1. * Emit the output intent for both PDF/A-1b and /X-4. This will be amended in a future commit to let the user choose the colorspace. The only missing bit is §6.5.4 of the PDF/X-4 spec. This imposes that all symbolic TrueType fonts shall *not* specify an Encoding, and have exactly one encoding in the cmap table. This is basically requiring what §5.5.5 in PDF 1.6 only suggests (page 400). However it seems that we are not embedding a cmap table when extracting a font subset, and that's already violating PDF/A-1b anyhow. This is tracked by QTBUG-125405. This work has been kindly sponsored by the QGIS project (https://qgis.org/). [ChangeLog][QtGui][QPdfWriter] Support for PDF/X-4 has been added. Task-number: QTBUG-125405 Change-Id: Ia81f29b07b819eca5767c9f17692d92a3010f5ad Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 2fbece8a73cb2d2692c78c38e1576c0c9c62fce7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
…
Description
Languages
C++
84.3%
HTML
4.9%
C
3.9%
CMake
3.6%
Objective-C++
2%
Other
0.8%