Copy link to clipboard
Copied
Hello, very novice javascript user here.
I have been using a .sequ to disable the automatic print window from opening by executing the following script:
this.removeScript("0000000000000000");It successfully removes files received with existing script:
//<Document-Level>
//<ACRO_source>0000000000000000</ACRO_source>
//<ACRO_script>
/*********** belongs to: Document-Level:0000000000000000 ***********/
this.print({bShrinkToFit: true});
//</ACRO_script>
//</Document-Level>Now I am trying to adapt that script to create a new .sequ to disable the print box for files received with the following:
//<Document-Actions>
//<ACRO_source>Document Open</ACRO_source>
//<ACRO_script>
/*********** belongs to: Document-Actions:Document Open ***********/
this.print({bUI:true,bSilent:false,bShrinkToFit:true});
//</ACRO_script>
//</Document-Actions>I have tried the following three scripts without success:
this.removeScript("Document Open");
this.removeScript("{bUI:true,bSilent:false,bShrinkToFit:true}");
this.removeScript(";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;");
I know it's possible to disable each PDF individually by adding "//" to the beginning of "this.print" line, but a batch sequence would be so much more efficient, as I have quite a few to do.
Any help would be appreciated.
Copy link to clipboard
Copied
What can you see at Tools > JavaScript > Document JavaScripts?
Copy link to clipboard
Copied
This is what I see:
Copy link to clipboard
Copied
This is a bad created script or the document is damaged.
Copy link to clipboard
Copied
I was in error! The above was copied from a document in which I tried to recreate the problem environment. Apologies. Having located a pesky original, here is what is present in Document JavaScripts:
Copy link to clipboard
Copied
There is no script to remove.
Copy link to clipboard
Copied
I see, so in other words, if the javascript lives under the "All JavaScripts" tab (and the "Document Actions" tab => "Edit All" pop-up), and not under the "Document JavaScripts" tab, there is no way to batch sequence its removal?
Copy link to clipboard
Copied
What can you see at "All JavaScripts"?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Looks like a document action.
Copy link to clipboard
Copied
Yes I get the same result at "Document Actions" tab => "Edit All...".
Is there a cure or am I doomed (to re-save each PDF individually)?
Copy link to clipboard
Copied
How did you created this document?
Copy link to clipboard
Copied
It was sent to us as directly from a vendor, as part of a portfolio. Some exhibit the problem behavior and some do not, but they are all part of the same bundle.
Copy link to clipboard
Copied
This sometimes happens when the file was created in a non-standard way. Acrobat is lenient with it and executes code, but JS has no access to it.
Copy link to clipboard
Copied
With Javascript you can remove the other document actions, but not document open.
Copy link to clipboard
Copied
Ah! Okay, well, an attempt was made! I appreciate your time and effort, and that of try67.
Copy link to clipboard
Copied
You can remove doc-level ("document open") scripts with JS, but you have to know their name.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more