Noob Need Help! Modify Convert to PDF Script to print PDF Folder

HI!
First post, first major Problem. This standard Script works fine for me but i want to print all items that show up in the PDF Folder automaticly on the default printer without any click. Should work on 10.3x too.
Many thanks in advance

property RadarProblem3258323IsFixed : false
property type_list : {"JPEG", "GIFf", "PICT", "TIFF", "PDF", "TEXT"}
property extension_list : {"jpg", "gif", "pct", "tif", "pdf", "rtf"}
--html is not currently handled

on run {}
	tell application "Finder"
		try
			set FinderSelection to the selection as alias list
		on error
			--Finder Scripting fails with one item (Radar problem 2741967) 
			set FinderSelection to the selection
		end try
	end tell
	
	if RadarProblem3258323IsFixed then
		set FS to FinderSelection
		--Ideally, this list could be passed to the open handler
	else
		set FS to {}
		repeat with EachItem in FinderSelection
			copy EachItem as alias to end of FS
		end repeat
	end if
	
	set SelectionCount to number of FS -- count	
	if SelectionCount is 0 then
		set FS to userPicksFolder()
	else if the SelectionCount is 1 then
		set MyPath to path to me
		if MyPath is item 1 of FS then
			--If I'm a droplet then I was double-clicked
			set FS to userPicksFolder()
		end if
	else
		--I'm not a double-clicked droplet
	end if
	open FS
end run

on userPicksFolder()
	set these_items to {}
	set these_items to (choose file with prompt "Select a file to convert to PDF:" of type {"JPEG", "GIFf", "PICT", "TIFF", "TEXT", "RTF"}) as list
end userPicksFolder

on open these_items
	set thesefiles to {}
	set the item_info to {}
	repeat with i from 1 to the count of these_items
		set this_item to (item i of these_items)
		set the item_info to info for this_item
		
		if folder of the item_info is true then --if the item is a folder
			processFolder(this_item)
		else if ((folder of the item_info is false) and ¬
			(alias of the item_info is false)) and ¬
			(the file type of the item_info is in the type_list) or ¬
			((the name extension of the item_info) is in the extension_list) then
			
			set theFilePath to (item i of these_items as string)
			set thePOSIXFilePath to POSIX path of theFilePath as string
			processFile(thePOSIXFilePath)
		end if
	end repeat
end open

--process folders 
on processFolder(theFolder)
	set these_items to list folder theFolder without invisibles
	repeat with i from 1 to the count of these_items
		set this_item to alias ((theFolder as text) & (item i of these_items))
		set the item_info to info for this_item
		if folder of the item_info is true then
			processFolder(this_item)
		else if (alias of the item_info is false) and ¬
			((the file type of the item_info is in the type_list) or ¬
				the name extension of the item_info is in the extension_list) then
			set theFilePath to (this_item as string)
			set thePOSIXFilePath to POSIX path of theFilePath as string
			processFile(thePOSIXFilePath)
		end if
	end repeat
end processFolder

on processFile(thePOSIXFileName)
	try
		set terminalCommand to ""
		set convertCommand to "/System/Library/Printers/Libraries/./convert "
		set newFileName to thePOSIXFileName & ".pdf"
		set terminalCommand to convertCommand & "-f " & "\"" & thePOSIXFileName & "\"" & " -o " & "\"" & newFileName & "\"" & " -j \"application/pdf\""
		
		do shell script terminalCommand
	end try
end processFile

Model: ibook
Browser: Safari 412.2.2
Operating System: Mac OS X (10.3.9)

I would think that something like this should work for you…


set printfile to "Macintosh HD:Users:someUser:Desktop:test.pdf"
try
	tell application "Image Events"
		close images
		open printfile
		print printfile with properties print settings {target printer:"MyPrinter"}
		close printfile
	end tell
end try

Hello and greetings everyone,

I was looking for a way to use the Adobe PDF 7.0 print setting to make a droplet that would convert files to PDF. I had it working under some circumstances, but now can’t remember what they were. I had to reboot due to a spinlock and here is my attempt to use the above-referenced code:

on open theList
	tell application "Image Events"
		repeat with theFile in theList
			close images
			open theFile
			print theFile with properties print settings {target printer:"Adobe PDF 7.0"}
			close theFile
		end repeat
	end tell
end open

I get the AppleScript error “Can’t make or move that element into that container” when I drop a jpg on the droplet.

On another version, I get “The file xxxxx.jpg doesn’t understand the print message.”

Is there a trick to getting a droplet that will process files and make PDFs? I was hoping Mac OS X would make a PDF out of ANYTHING using the Print technique.

Also, where does one direct the output files of the "print xxxxx with properties {target printer: “Adobe PDF 7.0”} command? Anyone know?

Thanks everyone!

Model: Mac G5 Dual 2.0
AppleScript: 1.10.3
Browser: Safari 417.8
Operating System: Mac OS X (10.4)