Bug 78637 - Poppler renders PDF file incorrectly.
Summary: Poppler renders PDF file incorrectly.
Status: RESOLVED MOVED
Alias: None
Product: poppler
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-12 22:06 UTC by thomash.usa
Modified: 2018-08-20 22:29 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
The pdf file (deleted)
2014-05-12 22:06 UTC, thomash.usa
Details
Screenshot of how the PDF is rendered in Adobe Reader (deleted)
2014-05-12 22:07 UTC, thomash.usa
Details
Screenshot of how the PDF is rendered by poppler (deleted)
2014-05-12 22:07 UTC, thomash.usa
Details

Description thomash.usa 2014-05-12 22:06:17 UTC
Created attachment 98946 [details]
The pdf file

Poppler's pdftoppm (and applications using poppler such as KDE's Okular) incorrectly render the attached file. In Adobe reader the file is properly displayed. 

The expected result is that the 'Meter summary' section is rendered properly. Instead the section is rendered as dots and the rest of the page is not rendered at all. The PDF used to render properly, but unfortunately I have not the version number when it used to work. 

The version in which it is broken is poppler 0.26.0-1.
Comment 1 thomash.usa 2014-05-12 22:07:12 UTC
Created attachment 98947 [details]
Screenshot of how the PDF is rendered in Adobe Reader
Comment 2 thomash.usa 2014-05-12 22:07:48 UTC
Created attachment 98948 [details]
Screenshot of how the PDF is rendered by poppler
Comment 3 thomash.usa 2014-07-08 18:45:43 UTC
Comment on attachment 98946 [details]
The pdf file

>%PDF-1.3

%%EOF
Comment 4 Albert Astals Cid 2014-07-08 22:51:38 UTC
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.
Comment 5 Tollef Fog Heen 2014-07-09 15:02:39 UTC
The content of attachment 98946 [details] has been deleted by
    Tollef Fog Heen <tfheen@err.no>
who provided the following reason:

Confidential

The token used to delete this attachment was generated at 2014-07-09 15:02:35 UTC.
Comment 6 Tollef Fog Heen 2014-07-09 15:02:59 UTC
The content of attachment 98948 [details] has been deleted by
    Tollef Fog Heen <tfheen@err.no>
who provided the following reason:

Confidential

The token used to delete this attachment was generated at 2014-07-09 15:02:56 UTC.
Comment 7 Tollef Fog Heen 2014-07-09 15:03:02 UTC
The content of attachment 98947 [details] has been deleted by
    Tollef Fog Heen <tfheen@err.no>
who provided the following reason:

Confidential

The token used to delete this attachment was generated at 2014-07-09 15:02:53 UTC.
Comment 8 GitLab Migration User 2018-08-20 22:29:06 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/poppler/poppler/issues/244.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.