Learn about printer and print commands

Source: Internet
Author: User
Tags processing text
Print command, also known as print control command. The computer uses the print control language, software commands to control printer operations, interpret and execute printed data, and obtain printed results. The print control language is the basis for the complex functions implemented by printers. It is directly related to the quality of printed input. Because our understanding of the printer control language is enhanced, we can better select and use the printer.

Currently, only three mainstream printer control languages are available:

EPSON's ESC command set
HP's PCL command set
Adobe's postscript (PS) command set

The ESC command set is the de facto industrial standard in the field of dot matrix printer and Bill printing; The PCL command set is the industrial standard in the field of Low-block laser printer and inkjet printer; the ps command set is the Page Description Language monopolized by the high-end typographical field.

The ESC command set and the PCL command set are command-interpreted languages. Similar to basic in advanced programming languages, each command printer is immediately responded to and executed. The control method is simple, convenient, and fast, so you cannot describe complex pages.

HPGL vector graphics command set (for pcl5) and ps command set are both compiled languages. Similar to C in advanced programming languages, a complete program composed of several commands is compiled, interpreted, and finally driven to print. Compared with PS, HPGL command set has some characteristics of command Interpretation Language. Only PS language is a real compiled page description language. However, both of them can describe the printed information in the unit of printing pages, which can print out complex images and images.

Software that uses ESC, PCL, And postscript accounts for more than 75% of all software. It can be seen that these three print control command languages play an important role in printing application design.

After a preliminary understanding of the above printer control language, we will give a more comprehensive introduction to various languages.
1. Epson's ESC command set

Epson, a Japanese company that manufactures external computer devices, shares a large portion of the current printer market, especially the dot matrix printer market. EPSON standardcode for printer has become the de facto industrial standard for the dot matrix printer control language. The ESC/POS printing command set is a simplified version of the ESC printing control command, currently, most tickets are printed using the ESC/POS instruction set. Most printers use the software Command Simulation Function of Epson ESC, and the formats and functions of other print control commands are similar to those of the ESC code set.

Because the early operating system DOS is different from the current Windows structure, there is no print driver provided by the hardware manufacturer between the internal software of the printer and the application software, the application software must directly control the printer through the hardware interface, so it is public from the emergence of the ESC command, otherwise no application software can use it, except for the standard ESC command, the commands for each type of printer are not the same, so in the DOS software, you can see that each application software only supports a few common printers.
  
The ESC command can be formally divided into two formats: Text control code and escape sequence code. The text control code is represented by a one-byte gain code, which implements instructions related to printer hardware operations. The escape sequence code consists of escape characters, parameter characters, or printed data.

Ii. HP company's PCL language

The PCL language is a printer Page Description Language launched by HP in 1970s for its laser printer products. The PCL language is open like the ESC command.

The PCL language was originally designed for dot matrix printers. pcl3 is the first widely used version, but it only supports some simple print tasks. Although pcl4 can only be used in Personal printers, it adds support for graphic printing. However, since the interpretation work is relatively simple, pcl4 has much lower requirements on the Print Controller than pcl5 and pcl6 in the later stages.

By pcl4, the features have been greatly enhanced, mainly to support scalabe fort, which can be changed at will, and to support HP's drawing language, namely, HP Gi-/2, the latter enables the laser printing device to be used as a drawing device.

Pcl5 (printer control language version 5) is a print control language launched by HP and an explanatory command language, similar to basic. The printer immediately interprets and executes each received command, instead of waiting for all commands to be received. The opposite is a compiled language (such as C ). Adobe's postscript printing Page Description Language, etc.), emphasizing the modularization and integrity of the statement. Only after all commands are received and compiled and connected can the corresponding functions be completed.

In 1996, HP released pcl6, which is more flexible. It is a target-oriented control language that greatly accelerates the processing of Multi-graphic files and achieves better WYSIWYG, therefore, you can better process web pages.

3. Adobe's postscript (PS) command set

Postscript is a product of Adobe. Unlike Epson and HP, Adobe is not a printing equipment manufacturer, but a tool software developer, therefore, since its birth, PostScript Language has completely different features from ESC and PLC, and is more in line with the software design philosophy. It is a printer language unrelated to the device, that is to say, when defining an image, the characteristics of the output device (such as the printer resolution and paper size) can be ignored, and the process of processing text and graphics is the same, this brings great flexibility to the processing of fonts.

Due to the device-independent feature of postscript, postscript uses the printer description (postscript printer description) to describe the output to a specific output device, such as the resolution, paper size, and input tray) file to implement different printer features. The PPD file mainly provides the following printer-related information: default/Maximum resolution, whether halftone monitoring, user-defined monitoring information, page size definition, and printable area, default font (usually courier), whether dual-sided printing is supported, and so on.

Various applications use the PS driver to convert their data into the postscript format. According to the working principle of the printing engine, the printer can only accept the bitmap format. When the printer controller converts postscript to the bitmap format, the general printing controller is hard to perform due to the complexity of postscript, raster image processor is usually used by printers to complete this conversion process.
Since the use of PostScript printers has high requirements on print controllers, and postscript is a registered product of Adobe, printer manufacturers must pay adobe for the use of PostScript Language in their products, just like the operating system cost that a PC vendor pays for Microsoft, the cost of using a postscript printer is higher than that of a printer using other languages and control methods. Therefore, some postscript simulations have also appeared, such as the postscript simulation used in some HP Laser printers, which can be fully compatible with Adobe's postscript, you do not have to pay for Adobe.

Postscript is a page description language widely used in grating devices. It can provide strong text and graphic descriptions without being related to devices, for example, you can translate, rotate, or scale the text character at will, and use the character and any closed area as the border of the cropping area. Thanks to these characteristics of postscript, coupled with the appearance of superior performance and low price laser printers, especially apple laser writer laser printers have been commercially successful, this makes postscript a "de facto" industrial standard in the field of high-quality and professional typographical printing.

The real rise of PostScript Language is the postscriptlevell published by Adobe in 1985. Its rich graphic functions, high-quality T-click E1 model, and device independence to page descriptions make postscr5pt widely accepted and become a de facto industrial standard. Various popular Spanish typographical software, such as PageMaker, veatura, quake expess, and CorelDraw, all support postscript.

At the end of 1990, Adobe launched postscriptlevel2 to take the level of descriptive ability and descriptive efficiency, further consolidating the role of PostScript as a standard page description language. Moreover, the ISO jtcl/sc24 Committee has recently recommended the PostScript Language as a major reference language for developing the image body standard.

The extensive application of PostScript Language is inseparable from its powerful skill in processing graphic texts. As a Page Description Language (PDL), post3133 has the following features:

1) ability to accurately describe various complex graphics, images, and justice. They can be translated, rotated, scaled in and out, and the body is processed as a graphic.

2) The image model is based on a flexible tinplate/paint image model. Not only is ntml and vector strokes used to describe graphs, but also cubic curve outlines used to describe graphs. The cropping area of this model can be enclosed in not only a rectangular box, but also any area.
  
3) supports device independence.
  
4) it is also a programming language with a suffix expression. The program structure consists of the preface and the document. It has 13 simple and composite object types, and its operator semantics is dynamic.

Postscr5pt is a page description language. the printed page data is completed by the built-in PostScript Language interpreter of the printer. When the interpreter executes the command of the description word 16, graphics, and images, it converts high-level PostScript Language descriptions to low-level grating data formats on specific output devices (such as printers. The PostScript Language has 1/3 of operators for graphic processing, and the remaining 2/3 can be used as a general computer programming language.

Generally, the PCL language is suitable for some common business office applications, while the PostScript Language is more suitable for professional applications with high requirements on graphics and color accuracy.

Epson esc/POS commands

Epson esc/POS control command
Commands in English Mode
Code functions code functions
Lf line feed ESC m local Cutting
Cr press enter esc o Seal
Esc sp sets the right boundary esc q release paper
ESC! Set the print mode. Select the print color for esc r.
ESC * sets the bit ing mode. esc z sets or cancels two-page parallel printing.
ESC @ initialize the printer ESC Bel buzzer on/off
Esc r select international character subset ESC C5 disable/enable panel switch
Esc d Printing and N travel paper ESC C6 disable/enable on-line switch
ESC t select character code table esc p generate specified pulse
ESC l select or cancel the reverse character ESC v sends the printer status
Select the print page for ESC C0 ~ Led ON/OFF
FF print out single page HT horizontal Tab
RS streamline tab ESC % select or cancel User-Defined Character Set
ESC 2 select the line spacing of 1/6 inch ESC & Custom Character Set
ESC 3: set the path to the smallest spacing. esc d: Set the tab position.
ESC <return the first line of esc I fully cut
Esc c sets the length of a single page. esc f sets the waiting time for a single page.
Esc f select or cancel single-page return area ESC e print disease return n rows
Esc j print at minimum pitch and input ESC C4 select print paper and detector (stop printing)
Esc k print at minimum pitch and return paper ESC C3 select paper end signal output
Esc u select or cancel one-way printing ESC C1 select row spacing
Commands in Chinese Mode
Code functions code functions
FS & select Chinese Character Mode FS-N set Chinese Character underline mode switch
FS. Cancel Chinese Mode fs! N select a Chinese font

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.