<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>406831</bug_id>
          
          <creation_ts>2019-04-23 21:41:43 +0000</creation_ts>
          <short_desc>RFC compliant URL to specify page number not treated properly</short_desc>
          <delta_ts>2020-09-10 15:23:44 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>okular</product>
          <component>PDF backend</component>
          <version>unspecified</version>
          <rep_platform>Debian stable</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.kde.org/show_bug.cgi?id=418758</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>wishlist</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>kdebugs.grokchem</reporter>
          <assigned_to name="Okular developers">okular-devel</assigned_to>
          <cc>aacid</cc>
    
    <cc>m.weghorn</cc>
    
    <cc>nate</cc>
          
          <cf_commitlink>https://invent.kde.org/graphics/okular/commit/b696d6dbfb8453948010ed786d9ab24bd3d1b485</cf_commitlink>
          <cf_versionfixedin>1.12</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1852247</commentid>
    <comment_count>0</comment_count>
    <who name="">kdebugs.grokchem</who>
    <bug_when>2019-04-23 21:41:43 +0000</bug_when>
    <thetext>SUMMARY

The URL RFC specifies that a specific page number in a PDF may be referenced using a format like &quot;file:///path/to/file.pdf#page=3&quot;.  This should bring the viewer directly to page 3.

STEPS TO REPRODUCE
1. okular &quot;file:///path/to/file.pdf#page=3&quot;

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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1852330</commentid>
    <comment_count>1</comment_count>
    <who name="">kdebugs.grokchem</who>
    <bug_when>2019-04-24 11:45:23 +0000</bug_when>
    <thetext>(In reply to kdebugs.grokchem from comment #0)

BTW, the relevant RFC:

https://tools.ietf.org/html/rfc3778#section-3</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1852389</commentid>
    <comment_count>2</comment_count>
    <who name="Albert Astals Cid">aacid</who>
    <bug_when>2019-04-24 17:52:47 +0000</bug_when>
    <thetext>#pagenumber works, shouldn&apos;t be too hard to extend i guess, but personally i don&apos;t have time to such a small corner case</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1852587</commentid>
    <comment_count>3</comment_count>
    <who name="">kdebugs.grokchem</who>
    <bug_when>2019-04-25 13:45:20 +0000</bug_when>
    <thetext>It&apos;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&apos;t, it could result in users complaining to GC support when the bug is in okular.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1852872</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Weghorn">m.weghorn</who>
    <bug_when>2019-04-26 19:32:50 +0000</bug_when>
    <thetext>That sounds quite easy to implement. I&apos;m taking a quick look.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1853027</commentid>
    <comment_count>5</comment_count>
    <who name="Michael Weghorn">m.weghorn</who>
    <bug_when>2019-04-27 14:12:36 +0000</bug_when>
    <thetext>Change on Phabricator: https://phabricator.kde.org/D20868</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1853053</commentid>
    <comment_count>6</comment_count>
    <who name="">kdebugs.grokchem</who>
    <bug_when>2019-04-27 16:42:53 +0000</bug_when>
    <thetext>Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1956551</commentid>
    <comment_count>7</comment_count>
    <who name="Albert Astals Cid">aacid</who>
    <bug_when>2020-09-10 14:32:45 +0000</bug_when>
    <thetext>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 &apos;master&apos;.

Support &apos;#page=&lt;pagenum&gt;&apos; fragment to open at page &lt;pagenum&gt;

Support the &apos;#page=&lt;pagenum&gt;&apos; fragment to specify which page
to open the document at, in addition to the existing &apos;#&lt;pagenum&gt;&apos;
syntax.

For PDF, the &apos;#page=&lt;pagenum&gt;&apos; 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</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>