<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 - Annotations of /Subtype /Popup are not added to /Annots array of a page"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=89136">89136</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Annotations of /Subtype /Popup are not added to /Annots array of a page
          </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>glib frontend
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>philipp.reinkemeier@offis.de
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=113460" name="attach_113460" title="PDF with broken annotation created using evince (via glib-frontend)">attachment 113460</a> <a href="attachment.cgi?id=113460&action=edit" title="PDF with broken annotation created using evince (via glib-frontend)">[details]</a></span>
PDF with broken annotation created using evince (via glib-frontend)

An annotation of /Subtype /Popup can be created and associated with a Markup
annotation (e.g. /Subtype /Text) by using poppler_annot_markup_set_popup().
However, this Popup annotation is not an explicit object of the API of the glib
frontend. This means currently, this annotation cannot be added to a pdf page
using poppler_page_add_annot (). Only the Markup annotation can be added.

But ALL annotations of a pdf page need to be referenced from an /Annots array
(see pdf specification). Poppler fills this array by keeping track of all
annotations that have been added to a page. So if
poppler_annot_markup_set_popup() is used to create a Popup annotation and link
it to a Markup annotation (say "annot"), and "annot" is added to a page, then
the Popup annotation is missing in the /Annots array of that page.
Btw.: This is how text annotations are currently implemented in evince.

The resulting pdf is NOT correct with respect to the pdf specification. The
effect is that an annotation created by evince has no popup window in acrobat
reader. In evince and okular it has a popup window. It seems that poppler is
more forgiving when loading such a pdf and accepts that the Popup annotation is
missing in the /Annots array.

The attached uncompressed pdf is a minimal test case. It contains a pdf
annotation of Subtype Text created using evince. If this pdf is opened in
acrobat reader, no popup window is shown when clicking on the annotation. If
one now manually adds the annotation of Subtype Popup to the /Annots array,
then everything works fine.</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>