Printing Korean Text on HPLJ-4V


Between some experience with arabic and other fonts and your FAX
information, I have some additional questions.

For a printer to print specific characters you must send the command
to put the printer into the specific character set.  This is usually
done automatically by the virtual printer translation table.    The
translation stage takes place in two stages.

Stage 1:  Translation uses the input 'code page' or 'symbol set' based
on the translation listed in the _X attribute.  by default this is:
IBM-eucKR which points to /usr/lib/lpd/pio/trans1/IBM-eucKR.
Characters are translated into a universal code page based on
/usr/lib/lpd/pio/etc.codepage.txt (on 3.2.5) This is not used, but
shows what the characters are translated to in stage 1.

Make sure you have /usr/lib/lpd/pio/trans1/IBM-eucKR.

Stage 2:   The stage 2 of the translation looks for the characters
from the intermediate code page  in an order specified by:
To::*[ISO8859-1],IBM-850[IBM-850],IBM-eucKR[IBM-eucKR,]  (for the
ibm4019.kor virtual printer).  I don't know of an HPLJ-4V.kor virtual
printer. This means that it first looks for the characters in the
trans2 table ISO8859-1, if it finds that it sends the command to put
the printer into this symbol set and continues to send characters as
long as it finds them in this symbol set.  You will not find Korean
characters in this symbol set, so we move to looking in the next
trans2 table IBM-850, again it will not find it there,  and finally it
will look in IBM-eucKR.  This means that you need to have a file
/usr/lib/lpd/pio/trans2/IBM-eucKR, assuming the PRINTER supports this
symbol set.  Now this is what would happen if you added as a 4019.kor,
but then this for sure will not work with an HP because this is NOT

Now this means that we don't have a korean virtual printer for hplj-
4v.kor that I know of, what are the chances of building one:  This
depends on several things.
1.  Do you have a /usr/lib/lpd/pio/trans1/IBM-eucKR file?  2.  Do you
have a /usr/lib/lpd/pio/trans2/IBM-eucKR file?  3.  Do you know what
the symbol set is used by the printer to print the characters.
     To find this put the HP Printer in Hex Trace mode and print from
one of the printers
      that works.  There will be a sequence in the file that starts
'ESC (' .  For example Roman
      8 will be used if you use ESC(8U.   If you use  ESC(12U you will
get PC-850 code page.
     I do not have the Korean code page settings.

Once you find the Correct command to put the printer into the Korean
symbol set then test it as follows.  Take the hp4 test file that you
had.  Edit the file with vi.  Insert at the very first of the file the
following  ctrl-v Esc (  ...   where ... is the rest of the switch to
symbol set command.   The ctrl-v Esc will put an escape in the file.
It will look like a carrot left squar bracket (on an english screen).
that is \^[ (8U   for Roman-8.  Save the file and cat the file to the
printer.  This does no translation and all the characters should be
printed.  If you have the RIGHT command and the printer supports
Korean this WILL work.  If that works we can make it work through a
virtual printer.

Adding to the virtual printer.  The code page search order used to be
specified by the t0, t1, t2, etc virtual printer attributes.  The code
symbol set commands are in the c1, c2, c2 ..  virtual printer
attributes.  You can find which attribute to put the command in by
doing the following:  cd   /usr/lib/lpd/pio/trans2 od -a IBM-eucKR |
head The second line will  contain the virtual printer attribute to
put the command.  For example in ibm.1046  (arabic) the od command
give:  0000000    P   I   O   S   T   A   G   E   2   X   L   A   T
E   0   0 0000020  nul nul nul stx   c   E   e   b del del nul nul del
del nul nul This means I need to add a 'cE' attribute to the virtual
printer and to add ibm.1046 in my search list for the printer, which
is the 'mB' attribute for the hplj-4v.pcl
mB=hplj.roman8,ibm.1046,hplj.ibmus,hplj.ecma.     I'd prefer if you
have a hplj.kor file int trans2.  cE=/033(.....   I don't remember the
command.  The /033 puts an escape in the sequence.

Homework:  Answer these questions.  Play around with _X and see what
changes?  Try setting _X=[enter] with nothing and setting all the c1,
c2, c3, etc all to the /033(... value to put the printer into Korean.

If all else fails try 'iconv' for converting.  You still need to send
the symbol set to the pr.inter.

NEXT:  Try this and report back.  What is the command string needed to
put the printer in Korean?    Good luck and let me know what works and
what doesn't so we kind library this for future use.  I'm not out of
ideas yet.

Support Line: Printing Korean Text on HPLJ-4V ITEM: BF5170L
Dated: February 1996 Category: N/A
This HTML file was generated 99/06/24~13:30:22
Comments or suggestions? Contact us