Closed ranga-tolapi closed 1 year ago
Hi @ranga-tolapi,
This is the issues tab of borb
. Please do not confuse this page with Stackoverflow.
If you have found a bug in the library, or you would like to request a feature, you are welcome to use this page. But your questions are more of the type "why is my code not working".
I have already pointed you towards the examples and the PDF specification. In particular 8.11.2
of the specification deals with optional content groups, and it will tell you exactly which keys you can query.
Keep in mind these keys might not be mandatory. A document without OCGs may not have the dictionary at all.
Kind regards, Joris Schellekens
Describe the bug For an existing PDF document, doc["XRef"]["Trailer"]["Root"]["OCGs"] giving an error KeyError: 'OCGs'
To Reproduce Execute the below python code snippet on the enclosed sample pdf.
Expected behaviour Expected to see a List of OCG layers.
Screenshots
Desktop (please complete the following information):