Skip to content

Commit

Permalink
fix(PdfExport): Set output condition
Browse files Browse the repository at this point in the history
If not, Qt sRGB default is automatically set
  • Loading branch information
troopa81 authored and nyalldawson committed Oct 17, 2024
1 parent fbe47ef commit 72b493b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/core/layout/qgslayoutexporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1311,6 +1311,12 @@ void QgsLayoutExporter::preparePrintAsPdf( QgsLayout *layout, QPdfWriter *device
{
QPdfOutputIntent outputIntent;
outputIntent.setOutputProfile( colorSpace );
outputIntent.setOutputCondition( colorSpace.description() );

// There is no way to actually get the color space registry identifier or even
// the registry it comes from.
outputIntent.setOutputConditionIdentifier( QStringLiteral( "Unknown identifier" ) );
outputIntent.setRegistryName( QStringLiteral( "Unknown registry" ) );
device->setOutputIntent( outputIntent );

// PDF/X-4 standard allows PDF to be printing ready and is only possible if a color space has been set
Expand Down

0 comments on commit 72b493b

Please sign in to comment.