<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - PDF bookmarks off by one"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=102698">102698</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>PDF bookmarks off by one
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>poppler
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>general
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>poppler-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>psychonaut@nothingisreal.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=134194" name="attach_134194" title="Sample file showing bookmark bug">attachment 134194</a> <a href="attachment.cgi?id=134194&action=edit" title="Sample file showing bookmark bug">[details]</a></span>
Sample file showing bookmark bug

In some PDF documents (in particular, those produced with the LaTeX Powerdot
class using a certain page size), the internal page bookmarks are all off by
one.  Take the attached document test.pdf as an example.  Regardless whether
you use the document's own hyperlinks in the left-hand column of the page, or
the PDF table of contents exposed by the PDF viewer, clicking on "A" takes you
to slide "B", "B" takes you to slide "C", and "C" takes you to slide "D".

This problem occurs only when viewing the document with Poppler-based viewers,
such as Okular and Evince.  Readers such as Adobe Acrobat Reader DC are not
affected.


Reproducible: Always

Steps to Reproduce:
1. Open the attached document test.pdf and click on the "A", "B", or "C" links
in the left-hand column of the page or in Okular's table of contents.

Actual Results:  
2. Clicking on "A" takes you to slide "B", "B" takes you to slide "C", and "C"
takes you to slide "D".

Expected Results:  
2. Clicking on "A" should take you to slide "A", "B" to slide "B", and "C" to
slide "C".


The document was created using an up-to-date TeX Live 2017 system and
Ghostscript 9.21's ps2pdf:

$ cat >test.tex
\documentclass[paper=smartboard]{powerdot}
\listfiles
\begin{document}
\begin{slide}{A}\end{slide}
\begin{slide}{B}\end{slide}
\begin{slide}{C}\end{slide}
\begin{slide}{D}\end{slide}
\end{document}

$ latex test;latex test;dvips test;ps2pdf test.ps
$ okular test.pdf

The problem may have something to do with the page size. The problem does not
occur when "smartboard" is changed to "screen", "a4paper", or "letterpaper". 
Looking at the Powerdot source code, it doesn't seem that Powerdot itself uses
the page size to determine how the bookmarks are set.

Downstream report: <a href="https://bugs.kde.org/show_bug.cgi?id=370949">https://bugs.kde.org/show_bug.cgi?id=370949</a></pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>