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 Link to comment https://forums.phpfreaks.com/topic/59867-printing-the-contents-of-my-website-using-php/ 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.. Link to comment https://forums.phpfreaks.com/topic/59867-printing-the-contents-of-my-website-using-php/#findComment-297677 Share on other sites More sharing options...
fekaduw Posted July 13, 2007 Author Share Posted July 13, 2007 what do u suggest then? Link to comment https://forums.phpfreaks.com/topic/59867-printing-the-contents-of-my-website-using-php/#findComment-297681 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. Link to comment https://forums.phpfreaks.com/topic/59867-printing-the-contents-of-my-website-using-php/#findComment-297682 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 Link to comment https://forums.phpfreaks.com/topic/59867-printing-the-contents-of-my-website-using-php/#findComment-297683 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.