Hello,
is it possible to get the contents of an OCG via JavaScript, specifically annotations?
After selecting an annotation it is possible to put it in a layer / an OCG, however I can't find any relation between OCG and its contents that I could use within a script.
thanks in advance
Get Annotations from OCG with JavaScript
Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan
- Tracker Supp-Stefan
- Site Admin
- Posts: 17941
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: Get Annotations from OCG with JavaScript
Hello benep,
an object inside a PDF file may belong to more than one OCG - so OCGs in their design are complicated.
And I've also spent some time looking at the JS documentation and indeed it does not seem like there's a way for you to get a list of objects that belong to a specific OCG. There does not seem to be methods to check for a specific annotation whether it is part of an OCG either (so e.g. you could iterate through all the annotations and check which are on your layer) .
Kind regards,
Stefan
an object inside a PDF file may belong to more than one OCG - so OCGs in their design are complicated.
And I've also spent some time looking at the JS documentation and indeed it does not seem like there's a way for you to get a list of objects that belong to a specific OCG. There does not seem to be methods to check for a specific annotation whether it is part of an OCG either (so e.g. you could iterate through all the annotations and check which are on your layer) .
Kind regards,
Stefan