diff options
author | Philipp Knechtges <philipp-dev@knechtges.com> | 2020-06-07 21:42:57 +0200 |
---|---|---|
committer | Albert Astals Cid <tsdgeos@yahoo.es> | 2020-11-01 22:10:25 +0000 |
commit | 0c772071baa74b11c66981f768dccf123f431ce1 (patch) | |
tree | 77d341e322411c3a8773100ba129f33ec7a77834 | |
parent | ccdee13835b66892355ebe1bb8d27556edee32be (diff) |
PSOutputDev/pdftops: for splashModeCMYK8 and language level >=2 activate overprint emulation
The overprint operands are always emitted for any language level >= 2, such that it is just consistent
to activate overprint emulation during rasterization if it is quite likely that the final device
supports this operation.
-rw-r--r-- | poppler/PSOutputDev.cc | 6 | ||||
-rw-r--r-- | utils/pdftops.1 | 4 | ||||
-rw-r--r-- | utils/pdftops.cc | 2 |
3 files changed, 9 insertions, 3 deletions
diff --git a/poppler/PSOutputDev.cc b/poppler/PSOutputDev.cc index ff2a21cb..67ae28fe 100644 --- a/poppler/PSOutputDev.cc +++ b/poppler/PSOutputDev.cc @@ -3140,6 +3140,7 @@ bool PSOutputDev::checkPageSlice(Page *page, double /*hDPI*/, double /*vDPI*/, i char hexBuf[32 * 2 + 2]; // 32 values X 2 chars/value + line ending + null unsigned char digit; bool isOptimizedGray; + bool overprint; #endif if (!postInitDone) { @@ -3191,7 +3192,10 @@ bool PSOutputDev::checkPageSlice(Page *page, double /*hDPI*/, double /*vDPI*/, i numComps = 3; paperColor[0] = paperColor[1] = paperColor[2] = 0xff; } - splashOut = new SplashOutputDev(processColorFormat, 1, false, paperColor, false); + // If we would not rasterize this page, we would emit the overprint code anyway for language level 2 and upwards. + // As such it is safe to assume for a CMYK printer that it would respect the overprint operands. + overprint = globalParams->getOverprintPreview() || (processColorFormat == splashModeCMYK8 && level >= psLevel2); + splashOut = new SplashOutputDev(processColorFormat, 1, false, paperColor, false, splashThinLineDefault, overprint); splashOut->setFontAntialias(rasterAntialias); splashOut->setVectorAntialias(rasterAntialias); # ifdef USE_CMS diff --git a/utils/pdftops.1 b/utils/pdftops.1 index 7ec85cf8..00e19856 100644 --- a/utils/pdftops.1 +++ b/utils/pdftops.1 @@ -205,7 +205,9 @@ bypass all security restrictions. Specify the user password for the PDF file. .TP .B \-overprint -Enable overprinting. +Enable overprint emulation during rasterization. For \-processcolorformat being CMYK8 and the language level +being higher than 2, this option is set to true by default. Note: This option requires \-processcolorformat to +be CMYK8. .TP .B \-q Don't print any messages or errors. diff --git a/utils/pdftops.cc b/utils/pdftops.cc index 6708e0bd..fd4557dc 100644 --- a/utils/pdftops.cc +++ b/utils/pdftops.cc @@ -172,7 +172,7 @@ static const ArgDesc argDesc[] = { { "-f", argInt, &firstPage, 0, "first page to { "-duplex", argFlag, &duplex, 0, "enable duplex printing" }, { "-opw", argString, ownerPassword, sizeof(ownerPassword), "owner password (for encrypted files)" }, { "-upw", argString, userPassword, sizeof(userPassword), "user password (for encrypted files)" }, - { "-overprint", argFlag, &overprint, 0, "enable overprint" }, + { "-overprint", argFlag, &overprint, 0, "enable overprint emulation during rasterization" }, { "-q", argFlag, &quiet, 0, "don't print any messages or errors" }, { "-v", argFlag, &printVersion, 0, "print copyright and version info" }, { "-h", argFlag, &printHelp, 0, "print usage information" }, |