

This line is pointing to the system Trash… #if exists theConvertedRecord then tell application "Finder" to delete theConvertedPath Set theConvertedRecord to import POSIX path of theConvertedPath to (parent 1 of theRecord)

Set theConvertedPath to (theFilePath & theFilename as string) Set default file path file path type documents path path theOldDefaultPath Save as theActiveDoc file format format PDF file name theFilename save as theActiveDoc file format format document default file name theFilename Set theFilePath to (path to trash) as string Set default file path file path type documents path path theFilePath Set theOldDefaultPath to get default file path file path type documents path Set theFilename to characters 1 through ((length of theName) - (length of ext) - 1) of theName as string Set theFilePath to container of theDoc as text Set theFile to (path of theRecord) as POSIX file Note that the PDF file is only created if the user chose to save the original document with additional preview information in Pages.Could anyone help with a script to convert Pages-Documents to PDF as the following script does with doc/docx files… Thanks a lot! property extensionList : Open this file to view a preview of the entire PAGES document.

This file only gives a preview of the first page of the document, but can still be helpful in some situations.
