A novice, I am trying to write a handler combining image files into one PDF. The handler needs three inputs:
- the sorted list of the image files
- the folder where to save the output PDF
- the file name of the output PDF
I have tried four different approaches scripting:
- the GUI of “Preview”
- a UNIX application
- Adobe Acrobat Pro X
4) Automator
In order to stay focused, I discuss each approach in a different post.
Automator actions 202 (“Get specified Finder items”) and 236 (“NewPDFfromImages”) make a workflow that could probably do what I need. However when I script
tell application "Automator"
make new workflow
add action 202 to workflow 1
add action 236 to workflow 1
end tell
I cannot get rid of the screen “Choose a type for your document”.
Furthermore, even when I bypass this problem by calling a saved workflow, I still do not know how to pass on to it from within a script:
- the files to process (the_files)
- the folder where to store the output PDF (the_folder)
- the name of the the output pdf (the_name)
My questions are:
- how does one address bypass the “Choose a type for your document” prompt when making a new workflow?
- when needing a small workflow, is the best practice to build it afresh as needed or always to call a saved one?
- how do I pass on variables from a script to a workflow?
Thanks in advance. W.