qpdfview fails in some cases to open pdf files created by pdflatex when using graphicx package to include graphics

Bug #1841558 reported by Toni Kontinen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
qpdfview
Incomplete
Undecided
Unassigned

Bug Description

qpdfview version: 0.4.18
poppler version: 0.80.0
Linux distribution: Arch Linux

I've created two simple LaTeX files. "b.tex" has graphicx package and an image included in it. "a.tex" does not. I create pdf files with pdflatex out of these two and call them "a.pdf" and "b.pdf". I am able to open "a.pdf" but not "b.pdf" in qpdfview. I am able to open "b.pdf" in Atril and it works fine. I am able to open "b.pdf" in new tab in qpdfview and it works fine, if I already have some other file open in another qpdfview tab. Following video explains the behaviour better. In it I also show contents of "a.tex" and "b.tex" and how I created pdfs out of them.

Video: https://www.youtube.com/watch?v=_X5y3zcUh5k

Revision history for this message
Adam Reichold (adamreichold) wrote :

Hello Toni,

thank you for taking the time to report this! Could you please attach both TeX documents and the resulting PDF files to this bug report? As a first guess, you could try running "file" against both PDF documents to see if there is a difference (qpdfview relies on libmagic/file or the shared MIME type database for file type detection).

Best regards,
Adam

Changed in qpdfview:
status: New → Incomplete
Revision history for this message
Toni Kontinen (tkkon) wrote :

I'm attaching tar archive containing the tex and pdf files to this comment.

I ran file against both pdf documents and got the following output:

a.pdf: PDF document, version 1.5
b.pdf: PDF document, version 1.5

Just now I also tried to open both pdf files at once using "qpdfview a.pdf b.pdf". They opened in their own tabs and worked fine until I closed the tab containing "a.pdf". Then "b.pdf" tab began to glitch again. The following video shows what happened.

Video: https://www.youtube.com/watch?v=KWug-pSfSAo

Thank you for your reply!

Revision history for this message
Adam Reichold (adamreichold) wrote :

Hello again,

using qpdfview's trunk against Poppler 0.79 and could not reproduce the issue. Hence, I suspect that Poppler 0.80 might have introduced the issue. Could you try whether using Poppler's Splash renderer without involving qpdfview, e.g. running pdftoppm on the files? Will try running against Poppler's master when I find the time...

Best regards,
Adam

Revision history for this message
Toni Kontinen (tkkon) wrote :

I ran pdftoppm. It created good ppm files of the pdf documents which I was able to open in my image viewer.

I tried downgrading poppler, poppler-qt5 and poppler-glib packages to version 0.79.0 and still experienced this issue.

I also tried to reproduce the issue on a separate Arch Linux machine and failed to do so.

I renamed my "$HOME/.config/qpdfview" directory and let qpdfview to create a new config directory. That solved the issue. Something in my configuration directory was likely causing this.

I've attached a tar file containing the old configuration directory to this comment.

I only edited the recently used line. It seemed to be irrelevant to this issue.

Revision history for this message
Adam Reichold (adamreichold) wrote :

Hello again,

I am not sure what to do next, but sadly I could not reproduce the issue by using your configuration. Will think about what else I could try...

Best regards,
Adam

Revision history for this message
Toni Kontinen (tkkon) wrote :

I edited the qpdfview.conf by hand and managed to find out that the combination of "scaleMode=1" under [documentView] and the values of "geometry" and "state" variables under [mainWindow] are very likely causing this issue. Simply resizing the qpdfview window or removing "scaleMode" variable from the configuration file seemed to fix this issue. I doubt it has anything to do with the graphicx package or LaTex. It seems like "scaleMode=1" with specific window size is the issue. I will attach the minimal configuration file causing the issue to this comment. I also added xwininfo output of the buggy qpdfview window and a link to a short video demonstration below.

Output of "xwininfo -name qpdfview -stats":

xwininfo: Window id: 0x4600006 "qpdfview"

  Absolute upper-left X: 2205
  Absolute upper-left Y: 432
  Relative upper-left X: 1
  Relative upper-left Y: 20
  Width: 794
  Height: 1057
  Depth: 24
  Visual: 0x510
  Visual Class: TrueColor
  Border width: 0
  Class: InputOutput
  Colormap: 0x4600005 (not installed)
  Bit Gravity State: NorthWestGravity
  Window Gravity State: NorthWestGravity
  Backing Store State: NotUseful
  Save Under State: no
  Map State: IsViewable
  Override Redirect State: no
  Corners: +2205+432 -1+432 -1-431 +2205-431
  -geometry 794x1057-1+432

Video: https://www.youtube.com/watch?v=DKQBDx9p-WM

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.