| | I'm making a site which generates a number of reports. I want to print it to the user's printer. Any idea how can I obtain this. Thanks in advance. |
|
|
PHP is for server side scripting, not client side. In order to achieve this, you're going to need java script:
CODE window.print()
Yes, that's really one of my concerns so I'm collecting ideas on how to go around it. the javascript print function is very primitive and it shows a dialog box before printing. need something to go around this. T_T
If the dialog box is the same one when you hit Ctrl+P on the keyboard (which i'm sure it is), then it is best if left that way. This allows users to pick the printer they want if they have more than one printer to choose from and it also allows them to modify the page margins, how many pages they want to print, etc.
I have two options to choose from. one is to connect to the client using a socket, or let the browser call my application. But both needs the client to install my app on their machines which has less security issues. my problem is which of the two would i choose.
I'd go with the browser call, assuming the client can still print offline. But i am left wondering, what is the purpose of PHP here, then, if it's more related to a desktop application?
One possibility might be to use the php functions to "write" a file for download and then have the client print it locally.
I was thinking of making php write a file and let the browser automatically call my app if ever it encounters the file created by php. But the action should be generated by php. or something like that. sounds wild.
as far as i know it is not possible in php. If possible pls somebody explain the procedure.
as far as i know it is not possible in php. If possible pls somebody explain the procedure. its possible. but you need to install something on the clients machine to be able to print to their printers. It's impossible to do it alone with just a server side script.
Recent Queries:-
Keywords : print, php, print, users, printer, php
how can I track on or offline users? (4) long explaination: hey, I'm building a user profile site right now. And, I kinda know how to Some help needed.. (5) I need some help if somebody can help me out please doit /smile.gif" style="vertical-align:middle" (2) I am running my own apache server with PHP and MySQL, with phpMyAdmin on my own computer, to test how do i get one? (7) I've been seeing a whole bunch of sites that have a Statistics corner, and in there, there are Display the total users anywhere on your site. (1) This is for phpBB V2+ It displays the total number of registered users anywhere you want. This file Multiple users using the same login (2) Hi, I'm realtively new to PHP and I'm considering creating some login functionality. Looking for print, php, print, users, printer, php
|
|
![]() How To Print In Php - How to print to the users printer using PHP |
| ADD REPLY / Got an Opinion! | a humble request :-) | RAPID SEARCH! | Free Hosting | [X] |
|
Express your Opinions, Thoughts or Contribute your information that might help someone here. Ask your Doubts & Queries to get answers.. "Together, We enlight each other!" |
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP. | 500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE |
|