Copy link to clipboard
Copied
I setup a Action Wizard action in Adobe Acrobat Pro, the purpose is to save the PDF as eps. I hope open a pdf file , then automatically perform actions, how to do with script?
Right. The batch process takes care of opening and closing the file(s) for you. You don't need to do that in the code.
This is all you need to add:
this.saveAs({cPath: this.path.replace(".pdf", ".eps"), cConvID: "com.adobe.acrobat.eps"});
Copy link to clipboard
Copied
Not possible. A script can't run an Action.
Copy link to clipboard
Copied
You can use a script to perform the same action, though, using the saveAs command, but you can't run it on multiple files, as an Action can.
Copy link to clipboard
Copied
script Acrobat is difficult for me,because it don't like Illustrator , can use "#target illustrator" to executing code. I don't know how to write a javascript to open pdf with Acrobat , then save as eps.
Copy link to clipboard
Copied
I see a code: var otherDoc = app.openDoc("/c/myDoc.pdf") to open a pdf, but this code how to execute by acrobat ?
Copy link to clipboard
Copied
Why do you want to open the file with code? It would be easier to create a generic script that just saves the current PDF file as an EPS. If you hard-code the path to the file into your code it will be much less useful.
Copy link to clipboard
Copied
My purpose is to batch process save as eps, rather than write a script for each PDF.
Copy link to clipboard
Copied
Right. The batch process takes care of opening and closing the file(s) for you. You don't need to do that in the code.
This is all you need to add:
this.saveAs({cPath: this.path.replace(".pdf", ".eps"), cConvID: "com.adobe.acrobat.eps"});
Copy link to clipboard
Copied
I can use java to open a pdf file with acrobat. now the difficulty of the problem is how to execute the eps code after opening it, and the next file can still continue to execute eps code. where to set up automatic execution code ?
Copy link to clipboard
Copied
Why Java? You can simply use the Action Wizard. Or are you trying to automate the entire process? If so, Acrobat is not suited for that.
Copy link to clipboard
Copied
TRY67, thanks a lot, I can use AppleScript to automate the conversion to EPS.
Here is a simple example.
set myFolder to (((path to desktop) as text) & "thScript:temp:")
tell application "Finder"
set pdfFileName to "123_TH.pdf"
set filePath to myFolder & pdfFileName
tell application "Adobe Acrobat"
activate
open file filePath
set AppleScript's text item delimiters to {"_", ".", " "}
set prefix to first text item of pdfFileName
set AppleScript's text item delimiters to ""
set epsName to myFolder & prefix & ".eps"
save document pdfFileName to file epsName using EPS Conversion with embedded fonts, images, preview, separations and annotation without binary given postScript level:3
close document 1 saving no
end tell
end tell
Copy link to clipboard
Copied