Guest
2011-08-29, 11:49 PM
It might prove simpler to export to RTF and then convert the RTF to PDF.
An illustrative snippet:
Code:
property pstrConvert : "/System/Library/Printers/Libraries/convert -f "
property pstrDesktop : POSIX path of (path to desktop)
property pstrTempFile : pstrDesktop & "tmp.rtf"
tell application "OmniOutliner Professional"
-- EXPORT TO RTF
set oDoc to front document
export oDoc as "OORTFPboardType" to pstrTempFile
-- CONVERT RTF TO PDF
do shell script pstrConvert & quoted form of pstrTempFile & ¬
" -o " & quoted form of (pstrDesktop & name of oDoc & ".pdf")
-- DELETE TMP RTF FILE
do shell script "rm " & pstrTempFile
end tell
--
Last edited by RobTrew; 2011-08-30 at 12:19 AM..
Reason: add comments to code