escpos-php icon indicating copy to clipboard operation
escpos-php copied to clipboard

Error al imprimir

Open mrpagesolution opened this issue 6 years ago • 4 comments

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

mrpagesolution avatar Jan 24 '19 20:01 mrpagesolution

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:

mike42 avatar Jan 29 '19 02:01 mike42

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:

— 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 .

mrpagesolution avatar Mar 14 '19 01:03 mrpagesolution

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();

macolmenero avatar Aug 26 '19 08:08 macolmenero

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

JuanRodrigoNaalPerez01 avatar May 15 '23 23:05 JuanRodrigoNaalPerez01