veraPDF / veraPDF-library

Industry supported, open source PDF/A validation library
http://verapdf.org/software
GNU General Public License v3.0
268 stars 48 forks source link

artifact annotation reported as error #1417

Closed u-fischer closed 3 months ago

u-fischer commented 5 months ago

In the attached PDF there is a link which is broken over two pages and which should be tagged within a single Link structure element. As it is on two pages there are two, basically identical, annotations related to this link. In my opinion the second annotation is no real content (similar to repeated table headers), so I want to put only the first annotation inside the Link structure and to mark the second as artifact by not including it into the structure tree. This is imho in accordance with PDF/UA-2:

8.9.2.2 Annotations as artifacts

Any annotation, regardless of its type, may be an artifact (see 8.3). Annotations that are artifacts shall either not be present in the structure tree or shall be enclosed within Artifact structure elements.

But verapdf complains about the artifact annotation:

Rule Status Specification: ISO 14289-2:202x, Clause: 8.9.2.1, Test number: 1
Annotations shall be included in the structure tree unless explicitly excluded by the following subclauses

Please note that 8.9.2.2 is one of "the following subclauses" of 8.9.2.1.

link-break-page.pdf

bdoubrov commented 5 months ago

I'd say that this case is covered by PDF/UA_2, 8.2.5.20: "Multiple link annotations shall be included in a single Link or Reference structure element if they target the same location and are semantically perceived to be a single link."

So, in this case a single Link structure element may include two link annotations, even if they are placed on different pages.

u-fischer commented 5 months ago

a single Link structure element may include two link annotations,

Sure one may do that, but that is not the point. I want to make the second annotation an artifact, and in the last pdf/reuse meeting it was explicitly confirmed that this is allowed and correct. An author can make this choice.

The list of annotations in the PDF/UA-2 subclauses is intended to mean "the following annotations must be artifacts" and not "only the following annotations can be artifacts". More annotations can be artifacts and it is wrong that verapdf complain here.

MaximPlusov commented 4 months ago

It was fixed in the latest dev build.

MaximPlusov commented 3 months ago

Included into release 1.26