summaryrefslogtreecommitdiffstats
path: root/src/opengl/qopenglwindow.cpp
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <[email protected]>2024-05-22 10:58:29 +0200
committerGiuseppe D'Angelo <[email protected]>2024-07-04 07:06:27 +0200
commit2fbece8a73cb2d2692c78c38e1576c0c9c62fce7 (patch)
tree4afaa3a14de4ffda5fde074bc9ffa0bed8d43f35 /src/opengl/qopenglwindow.cpp
parentba13bbd2d32652c8ffeef691c9a2ed3a7a65a82f (diff)
PDF: add support for PDF/X-4
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. Pick-to: 6.8 Task-number: QTBUG-125405 Change-Id: Ia81f29b07b819eca5767c9f17692d92a3010f5ad Reviewed-by: Allan Sandfeld Jensen <[email protected]> Reviewed-by: Volker Hilsheimer <[email protected]>
Diffstat (limited to 'src/opengl/qopenglwindow.cpp')
0 files changed, 0 insertions, 0 deletions