Is it possible to send a form feed to a printer using php?
thanks,
Luis
Is it possible to send a form feed to a printer using php?
thanks,
Luis
Luis,
If you are talking about doing it from a webpage then the answer is pretty much no. If you are talking about using a PHP script run through the CGI version and directing it to a print spool on the server, then I would say yes as it is just an ASCII code (don't remember off hand which one).
I read a while ago that there is suppose to be some support in CSS to allow the insertion of page breaks for printing. I don't think it is very well supported, and may be a CSS2 item. It might be something worth looking into though.
Tim Frank
Form feed is ASCII char 12 (0x0C)
I haven't tried but I guess, assuming you are sending plain text to the printer, it would look something like this:
<?php
$ff = chr(12);
$text = "Before form feed, $ff , after ff";
?>
If you wisk to add form feeds in a PRINT from a browser, I guess there may not be an easy way...
I think that this is possible, but you just going to have to combine php with JavaScript. JS has print() function, so try to play with it and see if you can get some of your stuff printing.
You can embed JavaScript within php...
Di