-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ArrayOfStructElem can't contain null #90
Comments
This raises a larger question about the handling of Dictionary handling is covered by 7.3.7 "A dictionary entry whose value is null (see 7.3.9, "Null object") shall be treated the same as if the entry does not exist." so dictionaries will never have a |
In the case of This is what existing Errata #157 on PDF 2.0 seeks to clarify. |
I'd still try to go for an argument for allowing
The second part of this text explicitly allows null objects as values. And the first part implies that Same applies to |
One of the issues in veraPDF/veraPDF-library#1355 is that the key in the So ISO 32000-2 definitely needs improvement in this area - and worthy of a separate Errata. |
@petervwyatt The keys in my example in the verapdf issue are not null. The key is the zero at the start, the value of this key is an array and inside this array are then the null values. |
Oh! Sorry - I didn't check the file and misunderstood... I just saw a long array of Certainly, name-/number-trees can have any object (including In the case of logical structure, there are plenty of "shall" statements saying what the value needs to be but |
I don't think so. This is about the parent tree, and the relevant section is 14.7.5.4, "Finding structure elements from content items" which says
I pondered a lot about this when implementing the tagging. The question is if every value in the array must be an indirect references to a structure element, which would imply that the MCID on a page must be numbered consecutively starting from 0. Or if the as small as possible in the note means that gaps in the numbering are allowed and if yes how to fill up the gaps (the null value is then a quite logical candidate). In LaTeX I implemented a strict numbering, but as shown by the axes4 example this is not the case in other implementations. A strict numbering would probably be a large problem for applications which edit a PDF as they would have to renumber the marked content sequences when content is deleted. |
Exactly. The issue is with the statement "... the value shall be an array of indirect references to the sequences’ parent structure elements." which does not permit It is good that it is raised and we can seek clarification - such as simply appending "or null" to that sentence. Do you happen to know if any popular implementations can be made to create a similar scenario, or do they renumber MCIDs? |
No sorry, I don't know much about other implementations, and I came only across this problem because I ran the checker on the new version of the best practice guide. |
Here is the result of merging two P into one in a popular implementation and doing incremental save. I see same |
@bdoubrov - can you please review https://github.com/pdf-association/arlington-pdf-model/blob/master/INTERNAL_GRAMMAR.md#proposals-for-future-predicates for solving this issue? |
@petervwyatt generally this is fine. I would only suggest removing |
The reason I'm drifting to using more explicit keys rather than implicit is that it: |
Current definition of
ArrayofStructElem
specifies element types asdictionary
, while it can also benull
.See veraPDF/veraPDF-library#1355
The text was updated successfully, but these errors were encountered: