Forum How do I...?

Turn HTML IDs into PDF annotations

I am looking for a solution with which I can identify in a PDF document created by Prince from which HTML element a paragraph originated. A solution would be PDF annotations for every HTML element which as a certain attribute or ID. Is this possible with Prince?

Best regards

Possibly with an extension to the tagged PDF structure tree, if the PDF viewer can query that?
Thanks. I went with another solution, namely using the prince-tooltip CSS attribute. I added the following to my style sheet.

* { -prince-tooltip: attr(id); }

This now creates a pdf annotation for every HTML element which has an id. Works like a charm.