HP-UX 11i v3 International Printing Features Table of Contents Abstract .............................................................................................................................................. 2 Intended Audience ............................................................................................................................... 2 Overview of I18N Printing on HP-UX......................................................................................................
Abstract This paper discusses general concepts of printing different kinds of international characters and the focuses are on international printing using HP’s PCL or PostScript® printers on the HP-UX 11i v3 operating system environment. This paper refers to such as I18N1 printing. Intended Audience This paper is primarily intended for general users and system administrators who have the need to print international characters on the HP-UX 11i v3 operating system environment.
I18N Printing Support on HP-UX The HP-UX operating system supports the printing of local language characters in text files and web pages2 for various types of printers. HP-UX uses the Line Printer Spooling System (LP spooler) for printer management. Figure 1 below illustrates the way LP spooler handles print requests in HP-UX. The LP spooler relies on printer model files to properly format and structure the incoming data into a format or language that printers can understand directly.
Table 1: Model Files for Local-Language Character Printing i Model Files Supported Languages Supported Printer Types Supported Data Formats ESCP Chinesei, Japanese, Korean ESC/P Text LIPS4 Japanese LIPS IV Text NPDLII Japanese NEC PDL2 Text PCL5.asian Chinese, Japanese, Korean PCL5 Text, PCL data PS.font All languages supported by HPUX PostScript Text, web pages This includes both simplified and traditional Chinese.
The /usr/old/usr/lib/lp/model directory contains old versions of PCL5.asian, ESCP, and LIPS4 model files for users who want complete backward compatibility, including bug-to-bug compatibility. The /usr/lib/lp/model directory also includes a couple of other PCL-related model files that provide some limited European languages and Japanese kana character support: • Some model files support the r8 and k8 options for selecting the Roman8 and Kana8 character sets, respectively.
Figure 2: Steps for Configuring HP Printers 6
Configuring Network and Remote Printers Either the HP System Management Homepage (SMH) or the lpadmin command can be used for configuring printers that connect to the host system directly via a serial or parallel interface. For configuring network printers, you can use either the setnetlp configuration command or the hppi command in the optional HP JetDirect® Printer Installer for UNIX® software. The network printer setup capability of SMH depends on the presence of the JetDirect software.
Quick Steps for Configuring HP Network Printers The following example shows the procedure for setting up an HP network printer using the setnetlp command. Step 1. Installing the HP JetDirect Printer Installer for UNIX software You may find the HP JetDirect Printer Installer for UNIX software on the CD that is bundled with the printer. You can also download it from the Software & Driver Downloads page on www.hp.com by searching on HP JetDirect Printer Installer for UNIX. The current version is E.10.34.
Enter 1 to add a network printer in response to the prompt.
Next, enter the network system name or hostname of the printer after selecting option 2.
Defaults of options for printer lj3 Optional Parameters --------------------------1) Banner page: 2) Paper Size: 3) Font DIMM: 4) Language: Current Settings ---------------[ON] [A4] [Unavailable] [ja_JP.SJIS] u) Update values by the current hardware setting r) Reset to default values q) Back to the previous menu. Select an item for change or select q: q Please note that initial values for Font DIMM and Language are set based on the current configuration of your printer hardware.
Configuring Remote Nonnetwork Printers To configure a nonnetwork printer that is connected to a remote HP-UX system for printing local language characters, the setnetlp command should also be used to set up the LP destination using the LPD protocol. In this case, the network system name should be the hostname4 or the IP address of the remote system, and the remote printer name should be the LP destination name of that printer on the remote system.
PCL Printing A number of model files are available for printing to an HP PCL5 printer. For printing Asian (CJK) characters in text or PCL data, the PCL5.asian model file can be used. For just printing single-byte European characters, the PCL5 model file can be used. When printing Asian characters using the PCL5.asian model file, the recommended way to select the desired character set is to supply the right locale-name option to the model file.
where # can be one of the symbol set IDs shown in Table 4. By switching primary and secondary character sets using shift-in and shift-out control codes, two sets of characters can be used at the same time. For more information, see the PCL5 Printer Language Technical Reference Manual. To print multi-byte characters, you must set both the symbol set ID and the corresponding text-parsing method correctly in order for the printer to print the desired characters correctly.
Table 5 and Table 6 list the features and options supported by the PCL5.asian model file for the HP LaserJet and HP OfficeJet series printers. These options can be specified via the –o option at the lp command line when its printer destination uses the PCL5.asian model file. Some options are optional and some are required to be specified explicitly. Default values of these options can be customized by modifying the model file that is a shell script and written in plain text.
C.utf8 udc# User defined character (optional) udcf umap# 2 | half Multiple pages per sheet (optional) 4 | quarter port | portrait Orientation (default = portrait) land | landscape lm# Left/Right margin (optional) Lines per page (optional) rm# tl# 10 12 c Character size/pitch (default=12) height# fp# hsi# psp fsp lpi# Line spacing (optional) vsi# mincho gothic batang dotum simsun simhei Font/typeface setting (optional) ming kai pming type# style# i | italic Other UTF-8 Unicode 5.
b | bold upright weight# dimm Font embedding (required, default=dimm) nodimm Set primary character style to bold Set primary character style to upright Set primary character weight to # Printer has Asian font DIMM/CF-card Printer doesn’t have Asian font DIMM/CF-card, host’s fonts are used for printing This option is required by PCL processing module of PCL5.asian to determine whether the target printer has optional font memory or not.
Print option list options Print list of available options with banner page For configuring HP OfficeJet printers, use the setnetlp command in interactive TUI mode with JetDirect software to set up the printer with the right customization options (pcl3 and nb). With the pcl3 option, PCL5.
Line spacing (optional) lpi# vsi# mincho gothic Font/typeface setting (optional) type# style# i | italic b | bold upright weight# Duplex (optional) Printing resolution (required default=dpi600) Page control (optional) Output Data format (required) User Data format (optional) d | double nd | ndouble dpi3 | dpi300 dpi6 | dpi600 rev pcl3 n | nroff pr Set lines per inch. Default is 6 lines per inch.
PCL Modified Text Processing (PCL Cooked) Mode Printing The PCL5.asian model file parses the input file to identify PCL commands that control character attributes (such as typeface, size, weight, and font) in the printing data so that the appropriate Asian fonts on the host can be used and downloaded to the printer on demand. For text printing using the PCL5.
and commands in the printing user data associated with those commands pass through the model file without modification. When one of the CJK utf8 locale options is specified, PCL5.asian can use all the available CJK glyphs for printing with the typeface listed in the table as the primary fonts. When C.utf8 is specified, PCL5.asian can switch typeface with PCL commands to any of the CJK typefaces listed in the table.
For font-name, you can use either an XLFD8 of the system's X font server fonts or a full path for PCF X11 fonts. The following is an example of the code font-mapping file. This example enables the use of UDC characters at 120-ku of Shift JIS. # Sample UDC code font mapping file # For ja_JP.
PostScript Printing Unlike other printer control languages, PostScript is a real stack-based programming language. As such, it can perform complex drawing operations in a concise manner. Table 8 lists the PostScript-specific model files and printing modes supported by HP-UX. Table 8: PostScript-Specific Model Files and Their Printing Modes Model Files PostScript Printing Modes PS.font Raw Local language text to PostScript with font embedding Mozilla PostScript font embedding PS2.
The psfontpf printer filter supports only PostScript level 2 and level 3 printers, which encompasses most PostScript printers in use today. The following are some of the more important features of the psfontpf PostScript print filter: • Supports all printers that have a PostScript level 2 or level 3 interpreter. • Supports most device-specific features specified in the Adobe® PostScript printer description file for that printer, such as selection of input tray and output bin.
Figure 3: Two Ways to Configure the PS.font Model File /usr/lib/lp/model Model Files Printer1 psmsgen setnetlp psmsgen PS.font /etc/lp/interface Interface Files Printer1 PS.ptr2 setnetlp Printer2 The prerequisite for configuring a specific PostScript printer is the availability of a PPD file for that printer. The PS.
The psmsgen configuration tool enables system administrators to customize and configure the following settings of PS.
*** PostScript Printer Configuration *** Please select one of the following manufacturer and printer types 1) HP black & white printers 2) HP color printers i) Import an external PPD file Please select an item, or press to quit: 1 *** PostScript Printer Configuration *** Please select one of the following PPD files 1) HP LaserJet 1300 PS (hpc1300s.ppd) 2) HP LaserJet 2200 Series (hpb22007.ppd) 3) HP LaserJet 2300 PS (hpc2325s.ppd) 4) HP LaserJet 2300L PS (hpc2320s.ppd) 5) HP LaserJet 2410 PS (hpc2410s.
encoding that matches the default locale set in the printer interface file, the printer produces output with unexpected characters. To support those applications properly, you might need to set up multiple LP destinations of the same printer with different default locales. User Configuration File The psfontpf print filter allows the use of an optional user configuration file to provide additional font information or for customization. See psfontpf(1M) for the format of the user configuration file.
Locale Alias For local-language character printing, locale is one of the most important options that you specify. To make typing the locale name easier, users can define an alias for the locale name, like “Japanese” for ja_JP.SJIS. Setup Macro A setup macro is used for representing a number of individual command-line options or keywordoption pairs by a simple, easily remembered word.
• Language, codeset, and locale aliases • Setup macros • Unicode character language font mapping sequence • Default Unicode bidirectional algorithm state • Iconv galley characters and custom conversions All the fonts defined in the configuration files are associated with a language tag, which is simply the language and territory part of the locale name (for example, en_US or ja_JP). When printing nonUnicode characters, only the fonts associated with the language tag of the current locale are used.
rm=right-margin pm=page-margin cpi=char-perinch hmi=hmotionindex Character size and line spacing Specifies the number of lines per page. lpi=lines-perinch Specifies the number of lines per inch. vmi=vmotionindex width=width even odd pages=m:n pn land landscape Orientation port portrait indent=indent italic Miscellaneous character formatting & control Specifies the horizontal motion index of a character. The unit of the index is 1/120 inch.
Character code selection Banner page or is a Unicode transformation format.11 locale=locale-name banner yb Enables banner page printing (default). nobanner nb Disables banner page printing. btray=input-tray Paper and tray selection itray=input-tray obin=output-bin paper=paper-size font=fontname Font control nopfont np nowc remap uwidth2=UnicodeRange widenchar wc Input format 11 Specifies the locale setting in which the filter processes the input file.
is text or PostScript. Duplex side=side Prints the job in a way specified by the side variable. Its possible values are: 1 | one_sided | one_sided_simplex Prints only one side of the sheet. 2 | two_sided | two_sided_duplex Prints on both sides of the sheet; the second side is reached by flipping the sheet about its left edge, as in the binding of a book.
Some of the built-in options are, in fact, aliases of PPD options listed in the following table. Therefore, specifying the corresponding PPD options is equivalent to using the built-in options.
When conflicting hmi and cpi options are specified, one of the following can occur: • If the hmi option specifies character spacing wider than the cpi option, extra space is added between characters to satisfy both options. • If the hmi option specifies character spacing narrower than the cpi option, the hmi option takes precedence. The character width is reduced to a level that is dictated by the hmi option.
• An XLFD font name13 Because the psfontpf print filter uses the Unicode character map (cmap) in the TrueType font, old TrueType fonts without a Unicode cmap section are not supported. When a TrueType or a PCF bitmap font is specified, additional font attributes can be appended after the font name, separated by commas. The supported font attributes are as follows: • cs=codeset Specifies the codeset name for the bitmap font only.
Comparison of PCL5.asian and PS.font Model Files Many of the capabilities of the PCL5.asian and PS.font model files are similar, but there are also some subtle differences. For instance, the same text file printed by the PCL5.asian model file might look slightly different from that of the PS.font model file because of differences in font selection and sizes. Table 11 compares the PCL5.asian and PS.font model files. Use this table to choose the model file that is best for your printing environment.
Appendix A: Common Printer Control Languages ESC/P The ESC/P printer control language was originally created by Epson to control their dot-matrix printers. It is now a de facto standard for dot-matrix printers from various printer manufacturers. The ESC/P printer control language is an escape sequences and control characters based printer control language. Different control characters and escape sequences are used to activate and deactivate different features of the printers.
PJL Printer Job Language (PJL) was developed by HP for providing job-level control that cannot be accomplished with PCL, PostScript, or other printer languages.