I do this a lot. If you want to use just the browser and server abilities
without introducing the complexities of PDF/XML/XSLT and such, it is not too
hard. I have done PDF, Standard Text and HTML to the browser and I have
printed directly to a printer from the server using PHP.

First, is the site a Corporate intranet where the server knows about all of
the shared printers connected to the network? Or, is the site accessed over
the internet? If it's a Corporate intranet then you can create reports and
submit them to the appropriate spooler. On Unix this is easy. I'm not sure
about Windows. You can gather a list of available printers and create a
little form that allows the user to select which printer to send the report
to.

If the site is over the internet then create the report in a separate window
that is divided into two frames. The top frame will consist of close and
print buttons. The second will contain the report and a JavaScript function
that performs the printing. The print button in the top frame, when pushed,
will execute the print function in the bottom frame.

The print function sets focus on the report and then executes this.print().
The print dialogue box will automatically pop up and the user can select
their own printer along with number of copies, etc. If you use HTML you can
even set page breaks (in IE5 anyway).

Have fun,


Dean





-----Original Message-----
From: Dan Koken [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 27, 2001 5:00 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Printing Reports 


As a Newbe to PHP, I need to print reports. I'd like to stay away from 
PDF but will use it if necessary.

In general, what seems to be the best way to print reports??????

It would be nice when they ask for a report it would brint in the report 
window that allows them to select the printer, number of copies, print 
quality etc.

Thanks for your help...
Dan.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to