Lijoyx Posted July 23, 2008 Share Posted July 23, 2008 hello friends, i have a desktop application in which i have a print button to print the reports. now i am converting my application in to php. i want to know whether i can have the same print button in the php too. if so just explain how to do it. Link to comment https://forums.phpfreaks.com/topic/116133-solved-php-and-printer/ Share on other sites More sharing options...
tibberous Posted July 23, 2008 Share Posted July 23, 2008 It's going to be a web-based app right? Like, you load it in a browser? If so, just use javascript's print function. Link to comment https://forums.phpfreaks.com/topic/116133-solved-php-and-printer/#findComment-597195 Share on other sites More sharing options...
vbnullchar Posted July 23, 2008 Share Posted July 23, 2008 <input type='button' value='print' onclick="window.print()" /> Link to comment https://forums.phpfreaks.com/topic/116133-solved-php-and-printer/#findComment-597197 Share on other sites More sharing options...
Lijoyx Posted July 23, 2008 Author Share Posted July 23, 2008 thank u guys. your replies are helpful. http://in.php.net/printer what is this for can u explain ? Link to comment https://forums.phpfreaks.com/topic/116133-solved-php-and-printer/#findComment-597219 Share on other sites More sharing options...
PC Nerd Posted July 23, 2008 Share Posted July 23, 2008 i assume that its not directly intended for web development. you can use those set of functions to print if your using the php cli.exe version ( isnt it)? Ive never used them before, but i assume ( correctly?) that their similar to most other alnguages printing functions. the easiest way to do it i find is to have a cron that will get the data, and then use a javascript onLoad = window.print(); setup - althoughi run that cron on another machine through windoes scheduled task (simply open a web browser but set homepage to xyz page is what i do to acheive that. gdlk. Link to comment https://forums.phpfreaks.com/topic/116133-solved-php-and-printer/#findComment-597237 Share on other sites More sharing options...
Lijoyx Posted July 23, 2008 Author Share Posted July 23, 2008 thank u every one Link to comment https://forums.phpfreaks.com/topic/116133-solved-php-and-printer/#findComment-597239 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.