View Single Post
thanks for that it works quit good ! and if I want to change the paths (I have a folder with subfolders and lots of .oo3 within) ? because I don't really understand the code (I repeat I'm new with apple scripting). For instance I'll move .oo3 to the desktop and after converted I'll move the .pdf to the nas. Furthermore I don't want to have a lot of .pdf within my folder so I need to remove all of them after the transfer.

Quote:
Originally Posted by RobTrew View Post
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 pamplemousseman; 2011-08-30 at 02:10 AM..