|
Posted by "Richard Lynch" on 10/25/05 05:27
On Mon, October 24, 2005 1:48 pm, Dave Lists wrote:
> I'm generating PDFs under windows using PDFlib and all is easy. What I
> am wondering though, and google reveals nothing usefull, can I print
> the
> PDF to a network printer from windows? I'm presuming to print the file
> I
> would ahve to use COM and open it under Acrobat? Anyone done this
> before
> and have any pointers? I'm printing out invoices and what to automate
> the task.
Slow down a sec...
Okay, is the networked printer networked to the WEB SERVER?
Or is it networked to the computer with the WEB BROWSER?
If it's the WEB BROWSER, then you can print the PDF just like you'd
print any PDF. PHP isn't in the picture at all. It's just a PDF
living in your web browser at that point.
It's not even a PHP question, just an MS/Adobe/PDF/Windows/Printer
question. Though, if you have my skill with screwing up printers,
that's a hell of a lot tougher than a PHP question. :-)
If, for some weird reason, you want to allow the user (authenticated,
logged in, trusted) to print to a networked computer on the WEB
SERVER, then your best bet is probably to figure out how to print that
PDF from MS-DOS and then to use http://php.net/exec to print it, I
would guess...
You might be able to use PHP to open up a COM object to convince
Adobe/Windows/whatever to print...
If it was a Un*x server, you'd just send the document to lpr or CUPS
or something, and be done with it, probably in a half-hour of work,
even allowing for a protracted battle with file/exec permissions.
--
Like Music?
http://l-i-e.com/artists.htm
[Back to original message]
|