pwmt / zathura

Document viewer
https://pwmt.org/projects/zathura
zlib License
1.88k stars 129 forks source link

Navigating to any page from index mode jumps to the bottom of the last page #367

Closed sebastinas closed 2 months ago

sebastinas commented 1 year ago

On GitLab by @descentcare on Dec 28, 2022, 14:28


in some pdf files, press tab, choose any page, press enter. Jumps to the bottom of the last page.

*Solved my problem but there's still a bug

I am on Artix linux with zathura version 0.5.1-1

The problem was in pdf backend. I believe it's a bug of zathura-pdf-mupdf backend, I installed poppler backend and problem was fixed.

Though there's no package for poppler backend in artix repositories, so I downloaded it from mirror here

https://archlinux.org/packages/community/x86_64/zathura-pdf-poppler/

and installed with

$ sudo pacman -U packagename.pkg.tar.zst

Also this was Desktop Environment independent. The bug was found in i3-gaps and I replicated it in xfce4

example pdf:

https://drive.google.com/file/d/1fBfGGC9CZrMwd1gwCiS1paYReqv_ZpVC/view?usp=drivesdk

sebastinas commented 1 year ago

On GitLab by @valoq on Dec 30, 2022, 18:22


This is reproducible with the current git version of zathura and zathura-pdf-mupdf using libmupdf 1.21.1 (2022-12-12)

Picking a chapter that is located on the first page will correctly make the application navigate to the first page. If the selected chapter is located on any other page number, it will go to the last page

Some documents will instead always go the first page, but choosing the first chapter it will instead go to the last page.

It appears to depend mostly on how the pdf was created and after going through some samples I noticed it never happens with pdf created by pdfTeX or LibreOffice and all of the affected documents I tested were created by Adobe products.

Metadata from documents affected by the bug:

PDF Version                     : 1.7
XMP Toolkit                     : Adobe XMP Core 5.6-c017 91.164464, 2020/06/15-10:20:05
Producer                        : Adobe PDF Library 16.0
Creator                         : Adobe InDesign 16.4 (Macintosh)

PDF Version                     : 1.6
XMP Toolkit                     : Adobe XMP Core 5.4-c005 78.147326, 2012/08/23-13:03:03
Creator Tool                    : PScript5.dll Version 5.2.2
Producer                        : Acrobat Distiller 8.0.0 (Windows)

PDF Version                     : 1.5
Producer                        : Acrobat Distiller 7.0 (Windows)
Creator Tool                    : dvips 5.83 Copyright 1998 Radical Eye Software

PDF Version                     : 1.3
Producer                        : Acrobat Distiller 5.0 (Windows)

Metadata from documents NOT affected by the bug:

PDF Version                     : 1.5
Creator                         : LaTeX with hyperref package
Producer                        : pdfTeX-1.40.13
PTEX Fullbanner                 : This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012/Debian) kpathsea version 6.1.0

PDF Version                     : 1.4
Producer                        : LibreOffice 3.6

PDF Version                     : 1.4
Producer                        : Apache FOP Version SVN tags/fop-1_0
Creator Tool                    : DocBook XSL Stylesheets with Apache FOP

PDF Version                     : 1.6
XMP Toolkit                     : Adobe XMP Core 5.4-c005 78.147326, 2012/08/23-13:03:03
Creator Tool                    : Acrobat PDFMaker 11 for Word
Producer                        : Adobe PDF Library 11.0

PDF Version                     : 1.4
XMP Toolkit                     : XMP Core 4.1.1
Producer                        : Acrobat Distiller 10.0.0 (Macintosh)

Here are some public example documents:

Affected by the bug:

NOT affected by the bug:

sebastinas commented 1 year ago

On GitLab by @valoq on Mar 5, 2023, 18:46


33

sebastinas commented 1 year ago

On GitLab by @andipersti on Apr 1, 2023, 18:08


See my comment on zathura-pdf-mupdf#33 for the reason for this behavior.