Fix conversion to ps when having multiple strips
This commit is contained in:
parent
bb6ca18d5b
commit
048e469392
37
poppler-0.20.2-ps-conversion.patch
Normal file
37
poppler-0.20.2-ps-conversion.patch
Normal file
@ -0,0 +1,37 @@
|
||||
commit ef7c2418e12d3e6a79f1d89a0051b005fadbc344
|
||||
Author: Thomas Freitag <Thomas.Freitag@alfa.de>
|
||||
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");
|
@ -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 <mkasik@redhat.com> 0.20.2-3
|
||||
- Fix conversion to ps when having multiple strips
|
||||
|
||||
* Mon Aug 6 2012 Marek Kasik <mkasik@redhat.com> 0.20.2-2
|
||||
- Make sure xScale and yScale are always initialized
|
||||
- Resolves: #840515
|
||||
|
Loading…
Reference in New Issue
Block a user