vmavrou Posted January 12, 2009 Share Posted January 12, 2009 Hi, i have this problem. I want to use the printer_write function. everywhere i see this : $handle = printer_open(?????); printer_write($handle, "Text to print"); printer_close($handle); ?> and at the ????? you put your printer. Because i'm making a page that i want the when the user wants to print some variables i want to use something so that it will start the printing at the default printer of every user. Not one only specified. Any ideas? Thank you in advance Quote Link to comment https://forums.phpfreaks.com/topic/140539-solved-printer_write-problem/ Share on other sites More sharing options...
rhodesa Posted January 12, 2009 Share Posted January 12, 2009 fyi, this will use a printer connected to the server hosting the website...not the user's printer...is that what you want? Quote Link to comment https://forums.phpfreaks.com/topic/140539-solved-printer_write-problem/#findComment-735452 Share on other sites More sharing options...
vmavrou Posted January 12, 2009 Author Share Posted January 12, 2009 ohh..i thought that it will use the user's printer No,what i want is every user's printer not server's printer, can you help me giving an idea what to look for? Quote Link to comment https://forums.phpfreaks.com/topic/140539-solved-printer_write-problem/#findComment-735543 Share on other sites More sharing options...
dennismonsewicz Posted January 12, 2009 Share Posted January 12, 2009 javascript will do this http://www.htmlgoodies.com/beyond/javascript/article.php/3471121 Quote Link to comment https://forums.phpfreaks.com/topic/140539-solved-printer_write-problem/#findComment-735546 Share on other sites More sharing options...
rhodesa Posted January 12, 2009 Share Posted January 12, 2009 as dennismonsewicz points out, you can use JavaScripts window.print(); which will bring up the printer dialog box. there is no way (with a webpage) to FORCE the users printer to start doing something...that would be a huge security violation Quote Link to comment https://forums.phpfreaks.com/topic/140539-solved-printer_write-problem/#findComment-735555 Share on other sites More sharing options...
vmavrou Posted January 12, 2009 Author Share Posted January 12, 2009 So i will try it with javascript Thank you so much for the fast replies helping me!! Quote Link to comment https://forums.phpfreaks.com/topic/140539-solved-printer_write-problem/#findComment-735560 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.