Backport most of the changes from poppler-0.20.3 - poppler-0.20.5
Backport commits which doesn't change API or ABI and are important. See poppler-0.20.3-5.patch for detailed list of included commits.
This commit is contained in:
parent
6f072c2af7
commit
44fc7d40d4
@ -1,27 +0,0 @@
|
||||
commit a53e0641365608f832b455404f1ee584d278e0c4
|
||||
Author: Albert Astals Cid <aacid@kde.org>
|
||||
Date: Sun Aug 5 15:07:16 2012 +0200
|
||||
|
||||
If NULL, NULL fails as password try EMPTY, EMPTY before failing
|
||||
|
||||
Reviewed by Jose Aliste
|
||||
Bug #3498
|
||||
|
||||
diff --git a/poppler/SecurityHandler.cc b/poppler/SecurityHandler.cc
|
||||
index 00c4ae1..a48449a 100644
|
||||
--- a/poppler/SecurityHandler.cc
|
||||
+++ b/poppler/SecurityHandler.cc
|
||||
@@ -105,7 +105,12 @@ GBool SecurityHandler::checkEncryption(GooString *ownerPassword,
|
||||
}
|
||||
}
|
||||
if (!ok) {
|
||||
- error(errCommandLine, -1, "Incorrect password");
|
||||
+ if (!ownerPassword && !userPassword) {
|
||||
+ GooString dummy;
|
||||
+ return checkEncryption(&dummy, &dummy);
|
||||
+ } else {
|
||||
+ error(errCommandLine, -1, "Incorrect password");
|
||||
+ }
|
||||
}
|
||||
return ok;
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
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");
|
@ -1,45 +0,0 @@
|
||||
commit dcbc923bd3592a81876f84005fbaddcea18641cc
|
||||
Author: Thomas Freitag <Thomas.Freitag@alfa.de>
|
||||
Date: Sun Jul 22 18:40:46 2012 +0200
|
||||
|
||||
Make sure xScale and yScale are always initialized
|
||||
|
||||
Bug #52215
|
||||
|
||||
diff --git a/poppler/PSOutputDev.cc b/poppler/PSOutputDev.cc
|
||||
index a01a4b3..e15c2e9 100644
|
||||
--- a/poppler/PSOutputDev.cc
|
||||
+++ b/poppler/PSOutputDev.cc
|
||||
@@ -3521,6 +3521,7 @@ void PSOutputDev::startPage(int pageNum, GfxState *state) {
|
||||
saveState(NULL);
|
||||
}
|
||||
|
||||
+ xScale = yScale = 1;
|
||||
switch (mode) {
|
||||
|
||||
case psModePSOrigPageSizes:
|
||||
@@ -3631,8 +3632,6 @@ void PSOutputDev::startPage(int pageNum, GfxState *state) {
|
||||
} else {
|
||||
yScale = xScale;
|
||||
}
|
||||
- } else {
|
||||
- xScale = yScale = 1;
|
||||
}
|
||||
// deal with odd bounding boxes or clipping
|
||||
if (clipLLX0 < clipURX0 && clipLLY0 < clipURY0) {
|
||||
@@ -3694,7 +3693,6 @@ void PSOutputDev::startPage(int pageNum, GfxState *state) {
|
||||
if (tx != 0 || ty != 0) {
|
||||
writePSFmt("{0:.6g} {1:.6g} translate\n", tx, ty);
|
||||
}
|
||||
- xScale = yScale = 1;
|
||||
break;
|
||||
|
||||
case psModeForm:
|
||||
@@ -3702,7 +3700,6 @@ void PSOutputDev::startPage(int pageNum, GfxState *state) {
|
||||
writePS("begin xpdf begin\n");
|
||||
writePS("pdfStartPage\n");
|
||||
tx = ty = 0;
|
||||
- xScale = yScale = 1;
|
||||
rotate = 0;
|
||||
break;
|
||||
}
|
1693
poppler-0.20.3-5.patch
Normal file
1693
poppler-0.20.3-5.patch
Normal file
File diff suppressed because it is too large
Load Diff
23
poppler.spec
23
poppler.spec
@ -1,24 +1,14 @@
|
||||
|
||||
Summary: PDF rendering library
|
||||
Name: poppler
|
||||
Version: 0.20.2
|
||||
Release: 5%{?dist}
|
||||
Release: 6%{?dist}
|
||||
License: (GPLv2 or GPLv3) and GPLv2+ and LGPLv2+ and MIT
|
||||
Group: Development/Libraries
|
||||
URL: http://poppler.freedesktop.org/
|
||||
Source0: http://poppler.freedesktop.org/poppler-%{version}.tar.gz
|
||||
|
||||
## backported patches
|
||||
# http://bugzilla.redhat.com/show_bug.cgi?id=845578
|
||||
# https://bugs.freedesktop.org/show_bug.cgi?id=3498
|
||||
Patch2: poppler-0.20.1-empty-password.patch
|
||||
|
||||
# http://bugzilla.redhat.com/show_bug.cgi?id=840515
|
||||
# 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
|
||||
Patch1: poppler-0.20.3-5.patch
|
||||
|
||||
Requires: poppler-data >= 0.4.0
|
||||
BuildRequires: automake libtool
|
||||
@ -126,9 +116,7 @@ converting PDF files to a number of other formats.
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%patch2 -p1 -b .empty-password
|
||||
%patch3 -p1 -b .scale-init
|
||||
%patch4 -p1 -b .ps-conversion
|
||||
%patch1 -p1 -b .0.20.5
|
||||
|
||||
chmod -x goo/GooTimer.h
|
||||
|
||||
@ -249,6 +237,11 @@ test "$(pkg-config --modversion poppler-splash)" = "%{version}"
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Nov 6 2012 Marek Kasik <mkasik@redhat.com> 0.20.2-6
|
||||
- Backport most of the changes from poppler-0.20.3 - poppler-0.20.5
|
||||
- (those which doesn't change API or ABI and are important)
|
||||
- See poppler-0.20.3-5.patch for detailed list of included commits
|
||||
|
||||
* Wed Oct 31 2012 Marek Kasik <mkasik@redhat.com> 0.20.2-5
|
||||
- Remove unused patch
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user