The printer is Godex's ez1105 economy
Label printer, use this printer need to install his driver and use the corresponding software to draw bar code for printing, now the need is to use PHP to print the printer content of the specified and printing operations, how to solve? Is there any other way besides the PHP scheme?
Php_printer
';echo printer_get_option($handle,PRINTER_RESOLUTION_Y);echo "
";echo 'format'.printer_get_option($handle,PRINTER_PAPER_FORMAT);echo "
";echo "modal".printer_get_option($handle,PRINTER_MODE);echo "
";echo "width".printer_get_option($handle,PRINTER_PAPER_WIDTH);printer_draw_text($handle, "Msup", 260, 0);printer_delete_font($lfont);printer_end_page($handle);printer_end_doc($handle);printer_close($handle);?>
Reply content:
The printer is Godex's ez1105 economy
Label printer, use this printer need to install his driver and use the corresponding software to draw bar code for printing, now the need is to use PHP to print the printer content of the specified and printing operations, how to solve? Is there any other way besides the PHP scheme?
Php_printer
';echo printer_get_option($handle,PRINTER_RESOLUTION_Y);echo "
";echo 'format'.printer_get_option($handle,PRINTER_PAPER_FORMAT);echo "
";echo "modal".printer_get_option($handle,PRINTER_MODE);echo "
";echo "width".printer_get_option($handle,PRINTER_PAPER_WIDTH);printer_draw_text($handle, "Msup", 260, 0);printer_delete_font($lfont);printer_end_page($handle);printer_end_doc($handle);printer_close($handle);?>
One possible reason to find out is that using a browser to perform PHP to access the printer, should read the browser's print configuration ( only possible reasons ), the command line directly execute the call to the printer's PHP script, you can print correctly, you can correctly read the printer configuration preferences.
Also: Because the ez1105 label printer belongs to an entry-only printer, it can only be connected via USB.
If it is a network printer, you can use the socket to communicate directly
If your printer supports the ESC POS instruction set, you can use this library mike42/escpos-php
Attached: Php_printer.dll extension Download address
Finally thanked Incnick classmate to give the solution idea!
PHP Connection Printer Wood has a whole
There is a JS control printer landlord can refer to the next http://www.lodop.net/index.html
Reference: https://segmentfault.com/q/1010000000476405/a-1020000000476544
In addition, if it is WiFi or GPRS printer, it will generally have the corresponding PHP interface.
CSS is ok, like