Saving as a PDF with Freehand...

I’m trying to automate the process of opening a Freehand document and exporting it as a PDF. I’ve written a script to open a document, but I can’t get it to save the document as a PDF. It works when saving as other file types, like FH9 or FH8, but not a PDF. Any Ideas???


I’m working with older stuff - FH 8 and OS 8.6 but this should work for you.

set myFile to alias "Macintosh HD:Desktop Folder:some file" --path to the FH file we will turn into a pdf
set endPath to "Macintosh HD:Desktop Folder:some file.pdf" --path to what will be our pdf file

tell application "FreeHand 8.0.1"
	activate --optionally bring FreeHand to the front
	open myFile --open the FH file
	save as PDF in file endPath --save it as a PDF in the file you designated
	close last document saving no --close the document without the dialog promting you to save changes
end tell

BTW - to save as a FreeHand 8 document using FreeHand 8 you have to use the following cryptic code. Thought I’d post it just because it is so odd.

save as "DataTypeAGD3" in file endPath