ali_kiyani Posted September 27, 2007 Share Posted September 27, 2007 Hi, I have a web page that displays CVs submitted by users (in DOC, PDF or RTF format). CVs are stored in a folder for e.g. user_cv Admin can select the CVs to be printed and then click on Print button. This should send all documents to printer for printing. How do I do that in PHP? Please check following screenshot. Thanks Link to comment https://forums.phpfreaks.com/topic/70852-printing-documents-from-php/ Share on other sites More sharing options...
trq Posted September 27, 2007 Share Posted September 27, 2007 PHP runs server side, printers are client side. Link to comment https://forums.phpfreaks.com/topic/70852-printing-documents-from-php/#findComment-356186 Share on other sites More sharing options...
ali_kiyani Posted September 27, 2007 Author Share Posted September 27, 2007 Yes but is there a way around? I mean even javascript has very limited printing functionality and I guess the only way of doing this is to either use Java Applet or ActiveX control! What's your take on this? Link to comment https://forums.phpfreaks.com/topic/70852-printing-documents-from-php/#findComment-356201 Share on other sites More sharing options...
redarrow Posted September 27, 2007 Share Posted September 27, 2007 becouse your admin prints them use javascript. <form> <input type="button" value="Print this page" onClick="window.print()"> </form> here a common printing class http://www.phpclasses.org/browse/package/2540.html Link to comment https://forums.phpfreaks.com/topic/70852-printing-documents-from-php/#findComment-356205 Share on other sites More sharing options...
d.shankar Posted September 27, 2007 Share Posted September 27, 2007 Or may be using CSS ... Check out http://www.frontpagewebmaster.com/m-127056/tm.htm#127056 Link to comment https://forums.phpfreaks.com/topic/70852-printing-documents-from-php/#findComment-356206 Share on other sites More sharing options...
redarrow Posted September 27, 2007 Share Posted September 27, 2007 read this aswell css only allow printing with ns or ie http://www.dynamicdrive.com/dynamicindex9/printstyle.htm as the admin printing shouldnt matter but i sugest javascript m8. Link to comment https://forums.phpfreaks.com/topic/70852-printing-documents-from-php/#findComment-356218 Share on other sites More sharing options...
d.shankar Posted September 27, 2007 Share Posted September 27, 2007 ok fine buddy.. whatsoever !! Link to comment https://forums.phpfreaks.com/topic/70852-printing-documents-from-php/#findComment-356219 Share on other sites More sharing options...
ali_kiyani Posted September 27, 2007 Author Share Posted September 27, 2007 Hmm..some cool solutions here...but just to clarify one point. All CVs will be stored on web server and the admin will be using a browser to print them like I said. That means I will have to first download CVs on client machine and then send them to print!? Link to comment https://forums.phpfreaks.com/topic/70852-printing-documents-from-php/#findComment-356227 Share on other sites More sharing options...
ali_kiyani Posted September 28, 2007 Author Share Posted September 28, 2007 Ok I tried to implement the CSS print technique as follows but it prints a blank page. <html> <head> <link rel=alternate media=print href="myfile1.doc"> <title>PRINT CV</title> </head> <body> Print This Page </body> </html> The file myfile1.doc exsits and there is text written in it but it only prints a blank page. What could be the reason? Link to comment https://forums.phpfreaks.com/topic/70852-printing-documents-from-php/#findComment-356979 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.