Skip to main content
Participant
March 25, 2020
Answered

Edit OCGs

  • March 25, 2020
  • 1 reply
  • 760 views

In an older question (link below) I found out that it is possible to give attributes to PDF layers to indicate which language they contain. 

It's also stated there, that AutoState can automaticially select the right layer if the OCGs are "properly configured". But how can I do so?

 

The question I'm speaking of:
https://community.adobe.com/t5/acrobat/one-pdf-document-multiple-languages/m-p/9934127?page=1#M106575

This topic has been closed for replies.
Correct answer Thom Parker

There are a number of ways to control the "AutoState" of an OCG, including zoom and language. An OCG can even trigger a script on a state change. These parameters are configured in the internal PDF dictionary that defines the particular OCG. You can read all about it in the PDF specification. An old version will do. 

 

However, None of these parameters can be edited from the Acrobat UI. Fortunately, there is a 3rd party plug-in exposes these properties for editing. You can get it here:

https://www.pdfscripting.com/public/programs/downloadsearch.cfm?searchtype=simple&searchmode=cat&keywords=recent&sortby=name&cat=Acrobat%20Plug-Ins

 

 

1 reply

Thom Parker
Community Expert
Thom ParkerCommunity ExpertCorrect answer
Community Expert
March 25, 2020

There are a number of ways to control the "AutoState" of an OCG, including zoom and language. An OCG can even trigger a script on a state change. These parameters are configured in the internal PDF dictionary that defines the particular OCG. You can read all about it in the PDF specification. An old version will do. 

 

However, None of these parameters can be edited from the Acrobat UI. Fortunately, there is a 3rd party plug-in exposes these properties for editing. You can get it here:

https://www.pdfscripting.com/public/programs/downloadsearch.cfm?searchtype=simple&searchmode=cat&keywords=recent&sortby=name&cat=Acrobat%20Plug-Ins

 

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Thom Parker
Community Expert
Community Expert
March 25, 2020

Another way to edit these properties is with a tool like PDFCanopener, which displays and edits the internal structure of the PDF file:

http://www.windjack.com/product/pdfcanopener/

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Participant
April 15, 2020

Thank you for your answer and the links, I will try it!