Hey dear developers,
I'm just writing my own parser to extract comments and highlights from PDFs. I've noticed that PDF-Xchange does not include the "/Type /Annot"-entry in the Annotation-dictionaries, and I wonder why.
I know that it is fully optional (see Table 164, section 12.5.2 of the pdf-specs), but this is the only reader I'm aware of that does not include it. I realize that "Subtype" is required, and therefore a more succinct marker of annotation-dictionaries, but to parse for just one marker is easier.
So I'm just wondering, is there any specific reason you don't include this? I'm sure I'm not the only parser stumbling over this (as everybody else includes it).
BTW. Words of praise for your annotation dictionaries in general: They are short but complete, not the mess created by Acrobat or Foxit (where you get up to three dictionaries for just one annotation). Thanks.
Why no "/Type /Annots" entry?
Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Paul - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange
-
Stefan - PDF-XChange
- Site Admin
- Posts: 19930
- Joined: Mon Jan 12, 2009 8:07 am
Re: Why no "/Type /Annots" entry?
Hello grovel,
I just spoke with the project leader for the Viewer and here are the reasons he gave:
1) it is optional;
2) we don't use it on annotation loading - /Annots array in pages may contain only annotations;
3) all other viewers work good without /Type entry there.
I have some good news as well - the new version of our Viewer/Editor adds the "/Type /Annot" for annotations though as it turns out it has not intentionally been coded for
- see the attached sample.
I just spoke with the project leader for the Viewer and here are the reasons he gave:
1) it is optional;
2) we don't use it on annotation loading - /Annots array in pages may contain only annotations;
3) all other viewers work good without /Type entry there.
I have some good news as well - the new version of our Viewer/Editor adds the "/Type /Annot" for annotations though as it turns out it has not intentionally been coded for
You do not have the required permissions to view the files attached to this post.
-
grovel
- User
- Posts: 13
- Joined: Thu Mar 27, 2008 1:27 pm
Re: Why no "/Type /Annots" entry?
Thanks a lot. As usual this is amazing service.
Of course, any viewer parsing from the /Annots array doesn't need to check. I'm trying to find stray-data, though
Nevermind, it has actually taught me a lesson, optional items should be optional! I'm now checking for the Subtype.
Cheers, and thanks, grovel
Of course, any viewer parsing from the /Annots array doesn't need to check. I'm trying to find stray-data, though
Nevermind, it has actually taught me a lesson, optional items should be optional! I'm now checking for the Subtype.
Cheers, and thanks, grovel
-
Stefan - PDF-XChange
- Site Admin
- Posts: 19930
- Joined: Mon Jan 12, 2009 8:07 am
Re: Why no "/Type /Annots" entry?
Glad we could assist grovel 
Cheers,
Stefan
Cheers,
Stefan