RE: [PHP] Printing Reports
-Original Message- From: John Monfort [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 27, 2001 5:03 PM To: Grimes, Dean Cc: 'Dan Koken'; '[EMAIL PROTECTED]' Subject: RE: [PHP] Printing Reports >Have you been able to bypass the dialog box? That is, send the file >directly to the printer, without the user's interaction? Actually, I have never tried to bypass the dialog box. Around here, for reports that first come to the screen in the browser, the user decides whether or not they want to print. If they do, they click the print button and then select their printer. However, I have other reports that print automatically and I just use PHP along with KSH to send them to the appropriate printers. Of course these reports contain no HTML. The user selects which reports they want to print, what printers they want them to go to and then submit the report selection form. The system takes it from there. Dean Grimes, > 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. Have you been able to bypass the dialog box? That is, send the file directly to the printer, without the user's interaction? If so, then I would love to learn how you did it. I was trying to do that with one of my projects, but couldn't. As far as I know, the browsers do not allow that. But, I've been told you could do it via sockets... Were you able to bypass the dialog box? -john > 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] > -- 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]
Re: [PHP] Printing Reports
From what I've read the new PHP printer functions look like they do exactly what I want. Unfortunately they only run on windows. Wonder if this will ever be available to all OS. For now I've got a lot of good ideas from everyone, and I'm on my way to 'having fun'. Thanks loads to everyone... Dan > > 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]
RE: [PHP] Printing Reports
Grimes, > 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. Have you been able to bypass the dialog box? That is, send the file directly to the printer, without the user's interaction? If so, then I would love to learn how you did it. I was trying to do that with one of my projects, but couldn't. As far as I know, the browsers do not allow that. But, I've been told you could do it via sockets... Were you able to bypass the dialog box? -john > 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] > -- 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]
Re: [PHP] Printing Reports
Thanks Dean; I like your idea a lot. They happen to be internet. If you have example code on your solution it would save me some time. Thanks again... I'm gonna try it. 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]
RE: [PHP] Printing Reports
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]
Re: [PHP] Printing Reports
What kind of reports? Your question is so general it can't be answered except by saying ... Send the report, to a new browser window if you wish, and then use the browser's controls to print the sucker.Why re-invent what already exists? Miles Thompson At 03:00 AM 11/27/2001 -0800, Dan Koken wrote: >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]
Re: [PHP] Printing Reports
On Tue, 27 Nov 2001, Dan Koken wrote: > As a Newbe to PHP, I need to print reports. One way to do it, I think is use XML/XSL. I have never done it before though (I use PDF's myself, but would like to get away from it).. Could anyone with some real-world experience with this elaborate, please? -- Alexander Deruwe ([EMAIL PROTECTED]) AQS-CarControl -- 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]
Re: [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. This really is becoming a faq. A search will come up with more information. Short anwer: You could write the report to the browser, use a new window if you have to. PHP=serverside and cannot print on your local printer.. I think you could create a javascript to handle the printing.. If it's from a local source like a MySQL database you could use a report generator --> seach the web.. they do exist.. www.google.com will be a good point to start. Bye, B. -- 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]
Re: [PHP] Printing Reports
what type of reports ??? if you really want to print it using a common printer i suggest that you go for PDF... if your type of reports are server log reports you can use GD or ImageMagick and display it using HTML cheers, Valter Santos - Original Message - From: "Dan Koken" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, November 27, 2001 11:00 AM 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]