View Single Post
Wonderful and very weird. Surely that must be a bug in the sandboxing implementation. I hope Apple doesn't find out and plug that hole in Mavericks.

Now my publishing works again! Yohoo!
Here's the script that I now got to work as an Applescript publishing step.
I'm sure it could be improved to grab the "current document" from the publishing context but I don't know how that's done.

tell application "OmniPlan"
	my exporttoPdf(front document)
end tell

on exporttoPdf(doc)
	tell application "OmniPlan"
		set theFile to (file of doc) as string
		-- remove extension and directory separator and append .pdf instead
		set theFile to ((characters 1 thru -7 of theFile) as string) & ".pdf"
		set theFile to POSIX path of theFile
		-- for unknown reasons, export from the sandbox only works with POSIX files
		export doc to POSIX file theFile as "PDF"
	end tell
end exporttoPdf