Hi Tobias,

Author of the email you cited, here. Also note that there is an open bug on the tracker to add individual annotation rendering to the glib bindings [1]. I've been patching libpoppler locally in my own project using something very much like the code in there [2].

For my own purposes, I've been developing a series of annotation test cases using various PDF readers, including Evince, iAnnotate (an iOS application), and PDF Studio Pro (a JDK application). The latter two are not free, but I would be happy to generate more examples using things like stamps, lines, shapes, and ink.

[1] https://bugs.freedesktop.org/show_bug.cgi?id=83643
[2] https://github.com/ptgolden/pdf2oac-js/blob/775c86b317c244bb0996f911fadca546b4545d5f/libpoppler/patches/0001-Add-poppler_annot_render.patch



On 02/16/2018 05:24 AM, Tobias Deiminger wrote:

Do you have PDF document(s) around that contain various types of annotations, for the sake of unit testing? (already checked git://git.freedesktop.org/git/poppler/test, no hit)

I'm asking because I'm working on a poppler patch and wanted to add unit tests before submitting it on bugzilla. The patch will add support for rendering individual annotations (as requested in [1]). The first version will have a QT5 API as

QImage Poppler::Annotation::renderToImage(double hDPI, double vDPI)

An obvious way to test this would be to render annotations from a test document and compare the resulting QImages with golden bitmaps. Do you think such a test will be maintainable? Rendering results might slightly change with algorithm evolution in splash/arthur/cairo versions, so the golden bitmap could need updates from time to time.

If I had to create test documents on my own, which authoring tools would you use? There's -Poppler of course, but it lacks some annotation related features like saving appearance streams for self-created annotations into the PDF
-Adobe tools are often considered as reference, but I had to buy them first
-maybe the pdfcomment TeX package? No idea how complete the standard is implemented there...

Best
Tobias

[1] https://lists.freedesktop.org/archives/poppler/2017-April/012165.html
_______________________________________________
poppler mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/poppler

_______________________________________________
poppler mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/poppler

Reply via email to