[Poppler-bugs] [Bug 78637] Poppler renders PDF file incorrectly.
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Tue Jul 8 15:51:38 PDT 2014
https://bugs.freedesktop.org/show_bug.cgi?id=78637
--- Comment #4 from Albert Astals Cid <aacid at kde.org> ---
The pdf itself is broken, there's a Tm operator with too few parameters, but
actually gs and Adobe are able to recover
with this hammer we kind of recover too with a few extra bad lines drawn
diff --git a/poppler/Gfx.cc b/poppler/Gfx.cc
index 90bf41e..ac09bb0 100644
--- a/poppler/Gfx.cc
+++ b/poppler/Gfx.cc
@@ -872,9 +872,9 @@ void Gfx::execOp(Object *cmd, Object args[], int numArgs) {
argPtr = args;
if (op->numArgs >= 0) {
if (numArgs < op->numArgs) {
- error(errSyntaxError, getPos(), "Too few ({0:d}) args to '{1:s}'
operator", numArgs, name);
- commandAborted = gTrue;
- return;
+// error(errSyntaxError, getPos(), "Too few ({0:d}) args to '{1:s}'
operator", numArgs, name);
+// commandAborted = gTrue;
+// return;
}
if (numArgs > op->numArgs) {
#if 0
@@ -3762,9 +3762,9 @@ void Gfx::opTextMoveSet(Object args[], int numArgs) {
}
void Gfx::opSetTextMatrix(Object args[], int numArgs) {
- state->setTextMat(args[0].getNum(), args[1].getNum(),
- args[2].getNum(), args[3].getNum(),
- args[4].getNum(), args[5].getNum());
+ state->setTextMat(args[0].getNum(), numArgs > 1 ? args[1].getNum() : 0,
+ numArgs > 2 ? args[2].getNum() : 0, numArgs > 3 ?
args[3].getNum() : 1,
+ numArgs > 4 ? args[4].getNum() : 0, numArgs > 5 ?
args[5].getNum() : 0);
state->textMoveTo(0, 0);
out->updateTextMat(state);
out->updateTextPos(state);
Someone with time should investigate if the setmatrix defaults i'm using are
good or not or what. I don't really have much time for this atm.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/poppler-bugs/attachments/20140708/44c66366/attachment.html>
More information about the Poppler-bugs
mailing list