Operating System - HP-UX
1827879 Members
1577 Online
109969 Solutions
New Discussion

Can I customize model scripts to print characters from different locale simultaneously.

 
SOLVED
Go to solution
Timmy Sin
Advisor

Can I customize model scripts to print characters from different locale simultaneously.

Hey Guys,

Can I customize the printing model scripts (say PCL5.nloo) to print characters from different locale simultaneously? I would like to print both traditional and simplified chinese characters in one file. For traditional or simplified chinese characters alone, I can use the option zh_HK.utf8 or zh_CN.utf8 respectively.

Any technical or white paper for printing mechanism and PCL is also welcomed.

Regards.
3 REPLIES 3
Frank Slootweg
Honored Contributor
Solution

Re: Can I customize model scripts to print characters from different locale simultaneously.

Do you want to (automatically) print the *whole* file in one locale and then the whole file in another locale, or do you want to print it in different locales line for line?

If the former (first), then it is best to set up a dummy printer (start with a copy of the "dumb" model script and modify that), which does not print the file, but does two *new* lp commands, i.e.

lp -d... -o.... $file
lp -d... -o.... $file


Bill Hassell
Honored Contributor

Re: Can I customize model scripts to print characters from different locale simultaneously.

The PCL5.nloo doesn't have any whitepaper to describe it's opertation. However, it should be fairly easy to describe a new -o option to do this.

Briefly, the .nloo script must process eacj line, one at a time. What it does is to examine each 16 bit symbol, then based on the locale setting, download a set of font characters for just that line, along with a set of dummy bytes to trigger those font characters to appear. This is done because the majority of printers will never have enough memory for a full Chinese character set, especially at high resolution.

So in the script, you can first process the special option, perhaps called -olocale2-zh_CN.utf8, and then where the processing of each line occurs, create a second copy of the same code but use the second locale and output a second line in the same manner.


Bill Hassell, sysadmin
Timmy Sin
Advisor

Re: Can I customize model scripts to print characters from different locale simultaneously.

Hey guys,

Thank you for your advice. In fact, I am looking for a workaround solution to print text files with Unicode characters encoded in utf8 format. Unicode character set, comprised of characters from different countries or languages, includes both simplified and traditional Chinese characters. Thus, characters from different countries or language may appear in one line. However, no option in the PCL5.nloo model script is available to print such files. It seems that HP do not support the Unicode standard on printing at all.

I am also looking for 3rd party solution for the problem. Grateful if someone can provide any information on it.