escpos-php
escpos-php copied to clipboard
Error al imprimir
Saludos Mike42, Tengo este problema que no puedo imprimir, la impresora esta compartida y copio el mismo nombre de la impresora compartida en el codigo pero me da este error:
Warning: copy(\Michael-PC\printers): failed to open stream: No such file or directory in C:\wamp32\www\FACTURA GENERICA\Sistemas\probarticket\ticket\src\Mike42\Escpos\PrintConnectors\WindowsPrintConnector.php on line 372
How are you successfully printing the text "Hello World" on the command-line? What is the usage of WindowsPrintConnector here?
If you have not consulted them yet, I would also suggest reading:
- The comments in example/interface/smb.php
- "Why do I get this error when I try to print?" from the FAQ.
Thank i got it,
but i can't print from my hosting or navegator do you can help me about it¨?
El lun., ene. 28, 2019 10:33 PM, Michael Billington < [email protected]> escribió:
How are you successfully printing the text "Hello World" on the command-line? What is the usage of WindowsPrintConnector here?
If you have not consulted them yet, I would also suggest reading:
- The comments in example/interface/smb.php https://github.com/mike42/escpos-php/blob/416e340f9cb90fa40611484f1b3c68df06205a84/example/interface/smb.php
- "Why do I get this error when I try to print? https://github.com/mike42/escpos-php/blob/0659800298f4843d51b5e0413263a8e62727c732/doc/FAQ.md#why-do-i-get-this-error-when-i-try-to-print" from the FAQ.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mike42/escpos-php/issues/692#issuecomment-458384051, or mute the thread https://github.com/notifications/unsubscribe-auth/Asw1NNPLOR4j0ztpcMnU3LIzquPfL_laks5vH7LdgaJpZM4aRsZb .
Hi, I have a similar problem. I have shared a printer \192.168.1.213\etiq and when I execute a php in localhost working right, but if I execute a php in remoteHost (the same network), send me this error: " file_put_contents(LPT2): failed to open stream: No such file or directory in C:\inetpub\wwwroot\pruebas\zebra\src\Mike42\Escpos\PrintConnectors\WindowsPrintConnector.php on line 386 Couldn't print to this printer: Failed to write file to printer at LPT2 " I try to put only $print_name=LPT2 and i have mapped shared printer name. If i excute in consola-msdos is going right, I try to put only $printer_name=\192.168.1.213\etiq i not working, the message is: "Couldn't print to this printer: Printer '\192.168.1.213\Etiq2' is not a valid printer name. Use local port (LPT1, COM1, etc) or smb://computer/printer notation. " Could you help me please? I don´t know how to continuos
Thi is de codigo in PHP: require DIR . '/autoload.php'; //Nota: si renombraste la carpeta a algo diferente de "ticket" cambia el nombre en esta línea use Mike42\Escpos\Printer; use Mike42\Escpos\EscposImage; use Mike42\Escpos\PrintConnectors\WindowsPrintConnector;
$nombre_impresora = "Etiq"; //$nombre_impresora = "\\192.168.1.213 \ Etiq2";
$connector = new WindowsPrintConnector($nombre_impresora); $printer = new Printer($connector); $printer -> text("Hello world");
$printer->feed(); $printer->close();
Saludos Mike42, Tengo este problema que no puedo imprimir con la impreseora XPrinter-58IIH estoy usando windows 11, me da este error: Warning: copy(\Juan\POS-58-Series): Failed to open stream: No such file or directory in C:\wamp64\www\pos\vendor\mike42\escpos-php\src\Mike42\Escpos\PrintConnectors\WindowsPrintConnector.php on line 372