These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Setting Open options with JS

StevenD
Registered: Oct 6 2006
Posts: 368
Answered

Is it possible to set the open options with JS. I want to use a batch sequence to set the open options of certain documents to page only. I know I can use the commands in a batch sequence to do this but I would like to check the document to see if it meets certain criteria before it executes the rest of the script. If it does then the document is processed if not then nothing is done.

I have looked for any properties or methods and cannot find anything so it makes me believe this can't be done but I just want to check with anyone out there to make sure I'm not overlooking anything.

StevenD

My Product Information:
Acrobat Pro Extended 9.3.1, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
The answer is, not exactly. With JavaScript, a document level script can be inserted that sets the page mode when the PDF is opened. This has the same effect as setting the document open property. But it does have some down sides, mainly that it doesn't work if JS is turned off or the PDF is viewed in a 3rd party viewer.

This specific request has comes up a lot with my customers and the only real solution is to write a plug-in. Fortunately it's a simple one, at least as far as plug-ins go.

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]

Then most important JavaScript Development tool in Acrobat
[url=http://www.pdfscripting.com/public/34.cfm#JSIntro][b]The Console Window (Video tutorial)[/b][/url]
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window(article)[/b][/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

StevenD
Registered: Oct 6 2006
Posts: 368
Thanks Thom. I didn't think there was a way to do it but just needed some confirmation.

StevenD