We are trying to use the below code but it gives error “NSReceiverEvaluationScriptError: 4 (1)”
tell application "Adobe Acrobat Pro"
activate
open PdfFile
end tell
tell application "System Events"
tell application process "Acrobat"
click the menu item "PostScript" of menu 1 of menu item "PostScript" of menu 1 of menu item "Export" of the menu "File" of menu bar 1
keystroke "/"
keystroke keyString & onlyFileName
keystroke "
"
keystroke "
"
end tell
end tell
It give a problem on click the menu item. This code is working fine on my own laptop but it doesn’t work on user system. All the configuration of OS and application version are identical.
Hi,
is 'Access for assistive devices" enabled in System Preferences > Universal Access ?
I don’t have Acrobat Pro and this may not be relevant to your problem, but ‘menu “File” of menu bar 1’ should be ‘menu 1 of menu bar item “File” of menu bar 1’. The first may work, but the second is correct and visibly faster.
Hi Stefen,
Yes it is enabled.
Thanks
I have tested the same code on different mac and it is working fine. But in few macs it shows error. Please help me to get rid of this problem.
I am really becoming concerning now.
Is there any way to save PDF file to EPS using any script without event scripting.
Regards
Yes:
set filepath to (choose file name with prompt "Name the exported file" default name "Untitled.eps") as text
tell application "Adobe Acrobat Pro"
set theDoc to active doc
-- set conversion properties
tell conversion 1 --eps
set postScript level to 2
set annotations to false
set binary to false
set embedded fonts to true
set halftones to true
set preview to true
set TrueType to false
end tell
save theDoc to file filepath using conversion 1 --eps
end tell
Not all conversion properties work in all versions, and I haven’t tested it on Acrobat 5, but it should work.