Skip to content

[RFC] glib: add new api to allow selecting annotations to render

This introduces new API that allows manually selecting which annotations to render and which not to render. I'm doing this mostly on the rationale that GNOME mockups have always wanted custom icons for annotations, and we want to implement those now. The annotations we want to implement ourselves will never be printed, so people will not see that difference.

I think introducing this API might not be a big deal, but I see a clear alternative to, at the same time, deprecate the rest (or at least most) of the rendering API. This is why it's marked RFC. Instead of having 4 functions that do basically the same thing and call the same internal private function, we could expose bool printing (maybe gbool?), and have a single one. Instead of:

poppler_page_render_for_printing(page, cairo), one could do poppler_page_render_full(page, cairo, printing, POPPLER_RENDER_ANNOTS_PRINT_DOCUMENT), and then we wouldn't even need the _for_printing.

@mkasik @nbenitez @chpe any thoughts?

TODOs:

  • Add to the demo
  • Add tests?
  • Finish adding annot types to the enum an to the decide function

Depends !1618 (merged)

Merge request reports

Loading