I am trying to set the Initial view of the PDF documents to Bookmark Panels and Page for PDF's having more than 5 pages. I have created an action using Action wizard in Acrobat DC pro and named it as Open options
Edit: This Open options action sets the PDF files initial view to Bookmark Panels and Page but it does that for all the PDF's irrespective of the number of pages in the document. But I need to run it just for the PDF's with > 5 pages.
To get the page count of a PDF file I do this:
for (var pagecount = 0; pagecount < this.numPages; pagecount++);
I could find how to execute menu items, like :
If pagecount > 5 then
app.execMenuItem("SaveAs");
But How do I do this:
If pagecount > 5 then
Call ActionItem "Open options";
I am unable to figure it out :( Could you point me in the right direction or any other way to do this.
You can't call an Acrobat Action from JavaScript. Unfortunately, you can't set the Initial View via JavaScript either. You'll need to do this in two steps, first separate the documents by number of pages, then run the action.