From 048e4693923a0b8e64543f10b7f201ab04b42991 Mon Sep 17 00:00:00 2001 From: Marek Kasik Date: Mon, 6 Aug 2012 16:43:42 +0200 Subject: [PATCH] Fix conversion to ps when having multiple strips --- poppler-0.20.2-ps-conversion.patch | 37 ++++++++++++++++++++++++++++++ poppler.spec | 9 +++++++- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 poppler-0.20.2-ps-conversion.patch diff --git a/poppler-0.20.2-ps-conversion.patch b/poppler-0.20.2-ps-conversion.patch new file mode 100644 index 0000000..0b52ff2 --- /dev/null +++ b/poppler-0.20.2-ps-conversion.patch @@ -0,0 +1,37 @@ +commit ef7c2418e12d3e6a79f1d89a0051b005fadbc344 +Author: Thomas Freitag +Date: Sat Jul 21 00:01:49 2012 +0200 + + Fix conversion to ps when having multiple strips + + Bug 51982 + +diff --git a/poppler/PSOutputDev.cc b/poppler/PSOutputDev.cc +index 540f74b..a01a4b3 100644 +--- a/poppler/PSOutputDev.cc ++++ b/poppler/PSOutputDev.cc +@@ -3049,7 +3049,7 @@ GBool PSOutputDev::checkPageSlice(Page *page, double /*hDPI*/, double /*vDPI*/, + double m0, m1, m2, m3, m4, m5; + int nStripes, stripeH, stripeY; + int c, w, h, x, y, comp, i; +- int numComps; ++ int numComps, initialNumComps; + #endif + char hexBuf[32*2 + 2]; // 32 values X 2 chars/value + line ending + null + Guchar digit; +@@ -3132,6 +3132,7 @@ GBool PSOutputDev::checkPageSlice(Page *page, double /*hDPI*/, double /*vDPI*/, + stripeH = (sliceH + nStripes - 1) / nStripes; + + // render the stripes ++ initialNumComps = numComps; + for (stripeY = sliceY; stripeY < sliceH; stripeY += stripeH) { + + // rasterize a stripe +@@ -3151,6 +3152,7 @@ GBool PSOutputDev::checkPageSlice(Page *page, double /*hDPI*/, double /*vDPI*/, + + // draw the rasterized image + bitmap = splashOut->getBitmap(); ++ numComps = initialNumComps; + w = bitmap->getWidth(); + h = bitmap->getHeight(); + writePS("gsave\n"); diff --git a/poppler.spec b/poppler.spec index 3b4c3d7..7c2e774 100644 --- a/poppler.spec +++ b/poppler.spec @@ -2,7 +2,7 @@ Summary: PDF rendering library Name: poppler Version: 0.20.2 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 or GPLv3 Group: Development/Libraries URL: http://poppler.freedesktop.org/ @@ -21,6 +21,9 @@ Patch2: poppler-0.20.1-empty-password.patch # https://bugs.freedesktop.org/show_bug.cgi?id=52215 Patch3: poppler-0.20.2-scale-init.patch +# https://bugs.freedesktop.org/show_bug.cgi?id=51982 +Patch4: poppler-0.20.2-ps-conversion.patch + Requires: poppler-data >= 0.4.0 BuildRequires: automake libtool BuildRequires: gettext-devel @@ -130,6 +133,7 @@ converting PDF files to a number of other formats. #patch1 -p1 -b .annot %patch2 -p1 -b .empty-password %patch3 -p1 -b .scale-init +%patch4 -p1 -b .ps-conversion chmod -x goo/GooTimer.h @@ -250,6 +254,9 @@ test "$(pkg-config --modversion poppler-splash)" = "%{version}" %changelog +* Mon Aug 6 2012 Marek Kasik 0.20.2-3 +- Fix conversion to ps when having multiple strips + * Mon Aug 6 2012 Marek Kasik 0.20.2-2 - Make sure xScale and yScale are always initialized - Resolves: #840515