Print files without dialog if .pdf or .doc

Hi everyone,

I have a bunch of files that are in portals on records in FileMaker. They are in fact file references to a mounted afp file share.

99.5% of the files are .pdf or .doc files.

Is there anyway to automate the printing of them so that you don’t have to open the file and then choose ‘print’. ??
either using AppleScript or Automator ??

thanks for any advice anyone can offer.
Steven

Steven:

Here is a handler that works for .pdf files. The argument it accepts is a non POSIX path to the document to be printed. You also need to specify the name of the printer as seen by the Unix underpinnings, using lpstat. You may find this thread useful for that. Anyway, once you have the printer name, you can just send all the PDF files through this handler, and as long as you have enough paper and ink, you can print 'em all up.

to printFile(b)
	set Print_er to "Deskjet_5400_series" --You get this from Terminal via the lpstat command
	set file_to_print to POSIX path of (b as Unicode text)
	try
		do shell script "lpr -P " & (quoted form of Print_er) & " " & (quoted form of file_to_print) --Prints the file (b) to identified printer
	end try
end printFile

I have never tried this with .doc files, so I don’t know if it will work. If not, I have another routine that I use for Microsoft Word to auto print .doc files for me. If you have Office 2004 and want to try that out, let me know.

Good luck, don’t be shy about asking for more help if you need it.