niwa3836 Posted January 13, 2008 Share Posted January 13, 2008 Hi Guys, Not been PHPing too long, but am doing ok, so maybe a noob question, maybe not.... I have been playing with the printer_ functions and have managed to print the word "test" to my local printer... great means installed ok etc etc. However am struggling to find some of it useful.... i.e. the commands "seem" to be a little weak, but am probably missing something. So for instance, can I create a normal page that has just been delivered to the screen, to automatically print to a printer? I have been playing with a barcode.php package which prints barcodes to the screen (3 of 9 for interest) without problem. However it prints as a JPG, just fine, but how do I get this to the printer? I.e. how can I do the same as I would in Iexplorer when I do <alt> print! Thanks in advance. Quote Link to comment https://forums.phpfreaks.com/topic/85832-using-the-printer_-functions/ Share on other sites More sharing options...
Hypnos Posted January 13, 2008 Share Posted January 13, 2008 I haven't used the printer functions, but looking at the manual, I only see support for BMPs. If your barcode.php is using the GD functions, you should be able to change it to output a BMP instead of a JPEG (just use the BMP function instead of the JPEG function). http://php.oregonstate.edu/manual/en/function.printer-draw-bmp.php http://php.oregonstate.edu/manual/en/function.imagewbmp.php Quote Link to comment https://forums.phpfreaks.com/topic/85832-using-the-printer_-functions/#findComment-438057 Share on other sites More sharing options...
niwa3836 Posted January 13, 2008 Author Share Posted January 13, 2008 Hi thanks for the response. I had already had a look at the Image commands from the php manual, but the only one I found is WBMP, which is the wireless standard. Not sure what the different is, but it doesnt seem to work. The code I am using normally changes the header to header ("Content-type: image/jpeg"); and therefore changed to various including :- header ("Content-type: image/vnd.wap.wbmp"); which didnt seem to work. It would be nice to answer this, but the question is generally larger, i.e. is there a way to take the current displayed html (php generated) screen and print it all to a printer, then I could get around a number of problems. Once again, thanks for any other replies..... Quote Link to comment https://forums.phpfreaks.com/topic/85832-using-the-printer_-functions/#findComment-438164 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.