Forum Bugs

Unexpected results with tagged PDF overrides and UA-1

Hi there!

We are seeing unexpected results when making a PDF with the UA-1 profile and attempting to override the PDF tag type. Here's a minimum input that reproduces the results without error or warning:

<html lang="en">
  <title>Tag Test</title>
      div.div {
        prince-pdf-tag-type: Div;
      div.sect {
        prince-pdf-tag-type: Sect;
      div.none {
        prince-pdf-tag-type: none;
    <h1>Tag Test</h1>

      <img src="" alt="a test image" />

    <div class="div">
      <img src="" alt="a test image" />

    <div class="none">
      <img src="" alt="a test image" />

    <div class="sect">
      <img src="" alt="a test image" />

    <img src="" alt="a test image" />

See attachment for the resulting tags, at least according to Acrobat.

The default, unmodified <div> renders as a <P>. The 2 <div>s with overrides unexpectedly insert a <P> above the <Figure>. The <div> that attempts to override with none renders as a <P> just like the default. The top level <img> renders, as expected, as a <Figure>.

The desired result here is that the <div> set to `prince-pdf-tag-type: none` renders like the top level <img>, i.e. without the <P> tag. I've included the other <div>s because they exhibit similar unexpected behavior.

This PDF was rendered by Prince 14.1 via DocRaptor.

Tony from DocRaptor Engineering
  1. tags.png62.6 kB
Thanks, we will have a fix for this issue shortly.
We have made some adjustments to tagging in the latest build to avoid inserting unnecessary P tags in this case.