SUMMARY The URL RFC specifies that a specific page number in a PDF may be referenced using a format like "file:///path/to/file.pdf#page=3". This should bring the viewer directly to page 3. STEPS TO REPRODUCE 1. okular "file:///path/to/file.pdf#page=3" OBSERVED RESULT Viewer opens page 1. EXPECTED RESULT Viewer opens page 3. SOFTWARE/OS VERSIONS Debian stable is used. Okular version is 0.26.1 in Debian stable.
(In reply to kdebugs.grokchem from comment #0) BTW, the relevant RFC: https://tools.ietf.org/html/rfc3778#section-3
#pagenumber works, shouldn't be too hard to extend i guess, but personally i don't have time to such a small corner case
It's strange that #pagenumber works because that does not conform to the RFC. Gnucash is considering adding page# support: https://bugs.gnucash.org/show_bug.cgi?id=797212 If GC follows the RFC but okular doesn't, it could result in users complaining to GC support when the bug is in okular.
That sounds quite easy to implement. I'm taking a quick look.
Change on Phabricator: https://phabricator.kde.org/D20868
Thanks!
Git commit b696d6dbfb8453948010ed786d9ab24bd3d1b485 by Albert Astals Cid, on behalf of Michael Weghorn. Committed on 10/09/2020 at 13:30. Pushed by aacid into branch 'master'. Support '#page=<pagenum>' fragment to open at page <pagenum> Support the '#page=<pagenum>' fragment to specify which page to open the document at, in addition to the existing '#<pagenum>' syntax. For PDF, the '#page=<pagenum>' fragment is specified in RFC 8118, section 3. M +21 -0 autotests/parttest.cpp M +11 -1 part.cpp https://invent.kde.org/graphics/okular/commit/b696d6dbfb8453948010ed786d9ab24bd3d1b485