Forum How do I...?

Is it possible to control PDF-Tag attributes?

callaghan
Hi,

I'm aware that you can export tagged pdfs and can control/remap the tag type using the -prince-pdf-tag-type: flag, but is it possible to also control any of the other attributes for a PDF tag, for example the Tag Title. Use case: if defining a DIV as a "Sect" tag can we also set the title?

Thanks
mikeday
Prince does not have a mechanism for this yet, are there any other PDF tag attributes you would need to set?
callaghan
Hi
Thanks for getting back on this.
I haven't had a chance to explore the other tagging fully to see if things are implemented elsewhere - but for accessibility we should be able to set the language attribute (not just document level), for example lang attribute on a span. I've included a screenshot of the pdf tag attributes that could be used. All would be beneficial to screenreaders. Is it a simple development to map the HTML attributes to the PDF Tag properties?
Thanks,
  1. pdf tag properties.png2.5 kB
mikeday
We've added a new prince-pdf-tag-title property to latest builds, which can be set to a literal string or an attr() to take an attribute value from the element, hopefully this helps!
callaghan
You're awesome, thank you!