Who is familiar with php_printer how to use PHP to operate a printer connected to Windows?

Source: Internet
Author: User
Keywords Php

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.

    1. If it is a network printer, you can use the socket to communicate directly

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.