Forum Bugs

"reference_content_item: content item already referenced" with relative position table with and absolute caption

RemcodM
I have the following HTML as a minimal reproduction sample:
<!DOCTYPE html>
<html lang="en">

<head>
    <title>Bug reproduction sample</title>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />

    <style media="all">
        caption {
            position: absolute;
        }

        table {
            position: relative;
        }
    </style>
</head>

<body>
    <table>
        <caption>Dummy table</caption>
        <thead>
            <tr>
                <th>Name</th>
                <th>Age</th>
                <th>City</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>John Smith</td>
                <td>34</td>
                <td>London</td>
            </tr>
            <tr>
                <td>Sarah Wilson</td>
                <td>28</td>
                <td>New York</td>
            </tr>
            <tr>
                <td>Mike Johnson</td>
                <td>45</td>
                <td>Chicago</td>
            </tr>
        </tbody>
    </table>
</body>

</html>


When instructing Prince to create a PDF/UA-1 of this input file, PrinceXML fails with the following message:
$ prince --pdf-profile="PDF/UA-1" /output/test.html -o /output/test.pdf
prince: internal error: reference_content_item: content item already referenced


The problem disappears once `position: absolute;` is removed from `caption` or when `position: relative;` is removed from `table`.
  1. test.html1.0 kB
    Minimal reproduction sample