Re: Newbie printing reports

From: Date: Tue, 16 Oct 2001 14:30:05 +0000
Subject: Re: Newbie printing reports
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-13364@lists.php.net to get a copy of this message
If you can make it a get rather than a post, you can create a URL straight to the report. Then, you can use html2ps to get the graphics and all rendered reasonably. It will not notice client end font changes, but it will be more predictable, and since it is post script, you could use it with lpr. Samios wrote:
I'm building an intranet Point-of-Sale application. Server : Linux/Apache/MySql/PHP. Clients : Linux and NT PC's running Mozilla/Netscape (browser can be changed). As each sale is entered, we have to print out a report (docket) to give to the customer - and a copy of this report for internal use. i.e. 2 copies of the same report. I have toyed with the Javascript print() method, but it always brings up a print dialog box. This really slows the process down - especially when the print dialog box appears with each call to print(). In the past, I have used reporting tools (such as Crystal Reports) which can send print jobs directly to the printer. Have any other intranet/database developers faced, and solved, this problem? I am vaguely familiar with the Linux lpr method which can send Postscript files direct to the printer. Using the exec() function in PHP, I was able to send a Postscript file to the printer. In my application, I am trying to print what appears in the users' browser, rather than a Postscript file. Can lpr offer a solution? I've wasted a lot of time on this problem and am developing a migraine. Any help would be appreciated.


« previous php.db (#13364) next »