<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Poppler renders PDF file incorrectly."
href="https://bugs.freedesktop.org/show_bug.cgi?id=78637#c4">Comment # 4</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Poppler renders PDF file incorrectly."
href="https://bugs.freedesktop.org/show_bug.cgi?id=78637">bug 78637</a>
from <span class="vcard"><a class="email" href="mailto:aacid@kde.org" title="Albert Astals Cid <aacid@kde.org>"> <span class="fn">Albert Astals Cid</span></a>
</span></b>
<pre>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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>