Click here to Skip to main content
15,891,184 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
dear sir or madam

how it is possible to print php directly by giveing path in printer_write.
My code
$print = file_get_contents('print_halad.php');
$handle = printer_open('EPSON TM-T81 Receipt');
printer_start_doc($handle, "Recipt Document");
printer_set_option($handle, PRINTER_MODE, "RAW");
printer_set_option($handle, PRINTER_SCALE, 20);
printer_set_option($handle, PRINTER_TEXT_ALIGN, PRINTER_TA_CENTER);
printer_start_page($handle);
printer_write($handle, $print);
printer_end_page($handle);
printer_end_doc($handle);
printer_close($handle);
?>

In my code when submit button is click i want to print print_halad.php with all values.

plese help mi.

Thank You.
Posted
Comments
Marc Gabrie 10-Aug-14 8:53am    
Is your printer attached to the machine where your PHP project will be hosted?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900