Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'An AppleScript for combining multi-page PDFs' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
An AppleScript for combining multi-page PDFs
Authored by: Dave Creek on Jun 04, '03 01:13:01PM

I got lost with your script corrections. Could you please post the full corrected script? Thanks.



[ Reply to This | # ]
An AppleScript for combining multi-page PDFs
Authored by: paulrob on Jun 04, '03 02:16:25PM

Arggh!

I had rather hoped that my original post wouldn't make it to the big screen. As you might have guessed I'm still learning Applescript. I'm a bit red faced!

I have now "discovered" Scripting Additions as used by Dark Shadow. And got rid of the first clunky loop too! The combined PaulRob/Dark Shadow script is: -

[Code]
on open (theItems)
set userDesktop to the path to desktop from user domain as text
set output_name to (choose file name with prompt
"Enter output filename" default name userDesktop & "untitled.pdf") as string
set UnixScript to "joinPDF " & "'" & (POSIX path of output_name) & "'"
repeat with aFile in theItems
set UnixScript to UnixScript & space & "'" & (POSIX path of aFile) & "'"
end repeat
do shell script UnixScript
end open
[/Code]

TTFN



[ Reply to This | # ]
An AppleScript for combining multi-page PDFs
Authored by: mr. applescript on Jun 04, '03 02:41:38PM

If you want to quote the POSIX path use the parameter "quoted form" as in this example:

quoted form of POSIX path of (choose file name)

-- returns: "'/Users/yourname/Desktop/myfile.pdf'"

The "quoted form" parameter adds the single quotes for you. The Apple TechNote for the Do Shell Script command is here:

<http://developer.apple.com/technotes/tn2002/tn2065.html>



[ Reply to This | # ]