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 Quote Link to comment 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. Quote Link to comment 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? Quote Link to comment 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 Quote Link to comment 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 Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
d.shankar Posted September 27, 2007 Share Posted September 27, 2007 ok fine buddy.. whatsoever !! Quote Link to comment 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!? Quote Link to comment 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? 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.