Rendering and printing HTML files

I’m not sure if this is the best list on which to post this question, but hopefully someone will at least be able to point me in the right direction. I’m trying to come up with a method that allows me to print out a local HTML file to the locally connected printer, without a print dialog box being displayed (or at least not displayed such that the user can see it). I’m creating a PHP-based program (actually a self-contained web-based application) that will run locally on a iBook laptop with OS X 10.3. After the user goes through a number of web forms (via a web browser in full screen mode), the PHP program creates a Report in the form of a HTML file (which is actually written to the hard drive). The user does not see the Report. All of this is currently functional.

What I would like to happen next is for the HTML file to be passed to a program that will render it and print it out without the file being displayed or a print dialog box showing up. Ideally I’d like to find a command line application that can take the HTML file as input, render it (either to memory or some intermediate format like PDF or PS), and print it out. I’m hoping this can either be done in one step entirely through the command line. If that’s not possible, another option would be either to have the HTML file loaded into a new Safari window (in the background or off screen) and then have Safari print out that page (without a dialog) and then close the Safari window. I believe I could do this with a combination of applescript and javascript. Another option might be to have Safari load the page, save it to a PDF or PS file, and then print out that file via ‘lpr’ which I know can print without a dialog box.

I currently know very little about applescript or Mac programming (my knowledge is limited to scripting in Perl, PHP, and the shell), so I’m not sure what direction to explore further. Thanks in advance for any help or pointers you can provide.