<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Add poppler_page_render_annot method"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=83643#c4">Comment # 4</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Add poppler_page_render_annot method"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=83643">bug 83643</a>
              from <span class="vcard"><a class="email" href="mailto:ptgolden0@gmail.com" title="Patrick Golden <ptgolden0@gmail.com>"> <span class="fn">Patrick Golden</span></a>
</span></b>
        <pre>I was getting ready to send a patch that looked much like this one after
inquiring about rendering individual annotations on the mailing list
(<a href="https://lists.freedesktop.org/archives/poppler/2017-April/012165.html">https://lists.freedesktop.org/archives/poppler/2017-April/012165.html</a>).

I am not sure I am a skilled enough C programmer to add highlight dragging to
the glib demo, but I can share my example use case. I am writing a program to
extract individual annotations from a PDF so that they can be aggregated and
analyzed across documents. For stamps, lines, etc., I need to have a visual
representation of the annotation to present to the user. In this code, I render
a single annotation and then send along a base64 encoded PNG image representing
its isolated visual representation:

<a href="https://github.com/ptgolden/pdf2oac-js/blob/glib/cpp/oac.cc#L116-L157">https://github.com/ptgolden/pdf2oac-js/blob/glib/cpp/oac.cc#L116-L157</a>

The poppler_page_render_annot in that code is the one I wrote, and it differs
from the one in this patch in only two trivial ways. First, the argument order
is switched around, and second, cairo_clip_extents is used to get the bounding
box to display (as suggested in a comment in the page code as well as in
_poppler_page_render).

What can I do to help this patch along?</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>