Jump to content

php printer functions not working


joaca

Recommended Posts

Hi guys, I am trying to get crackin' with php but a few difficulties. I have been trying to print a webpage called mini.php but finding some difficulty. Here is my code:

 

$handle = printer_open();
printer_start_doc($handle, "mini.php");
printer_start_page($handle);

printer_end_page($handle);
printer_end_doc($handle);
printer_close($handle);

 

Where could I be going wrong? Thanx

 

Link to comment
https://forums.phpfreaks.com/topic/150732-php-printer-functions-not-working/
Share on other sites

i haven't used this module...but i think you need to write to it:

 

<?php
$handle = printer_open();
printer_start_doc($handle, "mini.php");
printer_start_page($handle);
printer_write($handle, "Text to print");
printer_end_page($handle);
printer_end_doc($handle);
printer_close($handle);
?>

Actually I think that function

printer_write($handle, "Text to print");

 

will print the text "Text to print".

It prints directly from code to printer. That doesnt answer my question.

 

Need I say that the printer takes the paper but returns it blank? Ya, it does.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.