From d743821ec3b71e00af5dc5541d4e7bf5b003c55e Mon Sep 17 00:00:00 2001 From: Akira Kakuto Date: Sun, 24 Apr 2022 03:42:26 +0000 Subject: xpdf 4.04 git-svn-id: svn://tug.org/texlive/trunk@63119 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/libs/xpdf/xpdf-src/xpdf/PSOutputDev.cc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'Build/source/libs/xpdf/xpdf-src/xpdf/PSOutputDev.cc') diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/PSOutputDev.cc b/Build/source/libs/xpdf/xpdf-src/xpdf/PSOutputDev.cc index 0c39472ba85..b9fff4ffaed 100644 --- a/Build/source/libs/xpdf/xpdf-src/xpdf/PSOutputDev.cc +++ b/Build/source/libs/xpdf/xpdf-src/xpdf/PSOutputDev.cc @@ -1481,6 +1481,7 @@ void PSOutputDev::init(PSOutputFunc outputFuncA, void *outputStreamA, rotate0 = -1; clipLLX0 = clipLLY0 = 0; clipURX0 = clipURY0 = -1; + expandSmallPages = globalParams->getPSExpandSmaller(); // initialize font lists, etc. for (i = 0; i < 14; ++i) { @@ -1581,6 +1582,11 @@ PSOutputDev::~PSOutputDev() { customColors = cc->next; delete cc; } + if (t3String) { + // this will only happen if the 'd1' operator is used outside of a + // Type 3 CharProc + delete t3String; + } } GBool PSOutputDev::checkIO() { @@ -3827,6 +3833,7 @@ void PSOutputDev::setupImage(Ref id, Stream *str, GBool mask, } // filters + str->disableDecompressionBombChecking(); if (level < psLevel2) { useLZW = useRLE = gFalse; useCompressed = gFalse; @@ -4265,6 +4272,7 @@ GBool PSOutputDev::checkPageSlice(Page *page, double hDPI, double vDPI, } break; case psLevel1Sep: +#if SPLASH_CMYK writePSFmt("{0:d} {1:d} 8 [{2:d} 0 0 {3:d} 0 {4:d}] pdfIm1Sep\n", w, h, w, -h, h); p = bitmap->getDataPtr() + (h - 1) * bitmap->getRowSize(); @@ -4299,6 +4307,8 @@ GBool PSOutputDev::checkPageSlice(Page *page, double hDPI, double vDPI, processColors |= psProcessBlack; } break; + // if !SPLASH_CMYK: fall through +#endif case psLevel2: case psLevel2Gray: case psLevel2Sep: @@ -4510,7 +4520,7 @@ void PSOutputDev::startPage(int pageNum, GfxState *state) { } else if ((globalParams->getPSShrinkLarger() && (width * userUnit > imgWidth2 || height * userUnit > imgHeight2)) || - (globalParams->getPSExpandSmaller() && + (expandSmallPages && (width * userUnit < imgWidth2 && height * userUnit < imgHeight2))) { xScale = (double)imgWidth2 / (double)width; -- cgit v1.2.3