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

Click here to return to the 'Automate print to PDF using AppleScript and Pages' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Automate print to PDF using AppleScript and Pages
Authored by: musselrock on Oct 16, '08 06:36:16PM

I'm completely new to scripting Pages, but the following AppleScript will create a .pdf or .rtf file with text in the body on the first try without needing an existing template.

tell application "Pages"
set filname to (path to desktop folder as text) & "test.pdf"
set x to make new document with properties {path:filname}
set first paragraph of x to "test some text to test"
save x in file filname
end tell

[ Reply to This | # ]