fekaduw Posted July 13, 2007 Share Posted July 13, 2007 hello everyone, i just want to provide users of the my website by providing them a button. When users click on the 'Print This Document' button, i want the php code to search a default printer in their system and print the content of the page. How can i do it. Anyone having some idea??? thanks a lot Quote Link to comment Share on other sites More sharing options...
MadTechie Posted July 13, 2007 Share Posted July 13, 2007 PHP is a SERVER side script.. Javascript is a CLIENT side script... The printer is on the CLIENT side thus PHP can't do this.. infact javascript could probably only display the print dialog.. Quote Link to comment Share on other sites More sharing options...
fekaduw Posted July 13, 2007 Author Share Posted July 13, 2007 what do u suggest then? Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted July 13, 2007 Share Posted July 13, 2007 you need the javascript window.print(); how ever users will know how to print a page out if the want so I doubt you really NEED it. Quote Link to comment Share on other sites More sharing options...
deadonarrival Posted July 13, 2007 Share Posted July 13, 2007 How about echo-ing out the content, along with <h1>NOW CLICK FILE AND THEN CLICK PRINT<h1> Should do the job Quote Link to comment 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.