-
×InformationNeed Windows 11 help?Check documents on compatibility, FAQs, upgrade information and available fixes.
Windows 11 Support Center. -
-
×InformationNeed Windows 11 help?Check documents on compatibility, FAQs, upgrade information and available fixes.
Windows 11 Support Center. -
- HP Community
- Archived Topics
- Printers Archive
- Not printing proper Chinese fonts.

Create an account on the HP Community to personalize your profile and ask a question

09-11-2016 08:19 PM
Hello, I have a HP Laserjet P3015d and I acquired the Chinese font module for Asian fonts from HP.
My OS is Linux is: SUSE Linux Enterprise Server 11 SP3 (x86_64) and I using cups for printing.
At the moment I'm having problems because when I'm trying to print Chinese text ( Simplified Chinese), other Chinese text is being printed.
This is which my print file contains:
^[&l1O
^[&l26A
^[&t38P
^[(18C^[(s1p12v4s0b37366T^[(s0B^[&a1417H^[&a0V****** - V009 - 未知箱号 ^[(12U^[(s1p12v4s0b4148T^[(s0B
^[(18C ^[(s1p12v4s0b37366T ^[(s0B^[&a0H^[&a1417V日期 / 时间:^[&a1984H^[&a1417V^[(12U^[(s1p18v4s0b4148T^[(s3B09.09.16 / 15:30:53^[(12U^[(s1p10v4s0b4148T^[(s0B ^[(18C^[(s1p12v4s0b37366T^[(s0B^[&a3401H^[&a1417V箱>号:^[&a4818H^[&a1417V^[(12U^[(s1p18v4s0b4148T^[(s3B000005^[(12U^[(s1p10v4s0b4148T^[(s0B
* I have susbtitued the company name which was printed by ****** but other Chinese fonts are exactly the same.
However this is how it's being displayed:
Any idea why wrong Chinese characters are being printed?
Many thanks in advance.
Regards
09-12-2016 06:45 AM
I don't have enough information to be able to guess at the cause of your problem.
I can't yet see your image of "how it's being displayed" - these images may take a number of hours before they are "approved" and available for viewing.
Looking at your code snippet:
- I assume that you are using the graphic character pair "^[" as 'placeholders' for the non-graphic Escape control-code character.
- I can't tell exactly which hexadecimal codes represent your Chinese characters, since it may be the case that pasting them into this forum has converted them (e.g. to UTF-8 representation - I haven't checked this though).
So can you show explicitly the hexadecimal values used for the Chinese characters.
For the Simplified Chinese character set, I think that the values should be in the (non-contiguous) range 0xA1A0 -> 0xF7FE.
09-12-2016 08:09 AM
I can see your image now - but (as I don't know Chinese at all) it doesn't mean anything much to me , sorry.
Looking in more detail at your code snippet, the first four Chinese characters look like:
I'm not sure if this is what they're supposed to be (since I don't know what transforms may have been done in pasting and copying these characters).
If these ARE the required glyphs, then they are at the following Unicode code-points:
U+672A
U+77E5
U+7BB1
U+53F7
I think (I'm not 100% sure) that in the "Simplfied Chinese" 1/2 byte encoding (which you select in your PCL snippet), they would be represented by the following (Big-Endian) hexadecimal values:
0xCEB4
0xD6AA
0xCFE4
0xBAC5
So what (hexadecimal) values are you actually passing to the printer for these characters?
09-12-2016 08:18 AM - edited 09-12-2016 08:24 AM
For those four glyphs, the UTF-8 representations (where '0x' just indicates a hexadecimal value follows) would be:
0xe69caa
0xe79fa5
0xe7aeb1
0xe58fb7
If you are actually passing in UTF-8 encoded strings as per above, then you should probably:
- Select Symbol Set 18N ("Unicode") instead of 18C ("Simplified Chinese").
- Use "Text Parsing Method" 83 ("UTF-8") instead of method 38 ("1- or 2-byte Asian 8-bit").
09-13-2016 12:01 AM
I'm sorry but I'm not very familiar with how to print PCL with different encodings.
At the moment I tried this:
%PrinterCommand[&l1O]
%PrinterCommand[&l26A]
%PrinterCommand[&t83P]
%PrinterCommand[(18N]%PrinterCommand[(s1p12v4s0b37366T]%PrinterMMSetPos[50,0]1Be69caa1Be79fa51Be7aeb11Be58fb7 %PrinterUniverse[12]%PrinterSetMedium%VarSet[name=y_line_pos value=50]
With this print file
^[&l1O
^[&l26A
^[&t83P
^[(18N^[(s1p12v4s0b37366T^[&a1417H^[&a0V1Be69caa1Be79fa51Be7aeb11Be58fb7 ^[(12U^[(s1p12v4s0b4148T^[(s0B
But this is printing the hex code instead of the Chinese Symbol.
I've also tried without the 1B symbol, and using 0x before the code but there is not proper results.
Thanks in advance
09-13-2016 05:53 AM
Your string of data characters is "1Be69caa1Be79fa51Be7aeb11Be58fb7"; two points:
- You are inserting those characters as ASCII characters; the UTF-8 data should be added as hexadecimal byte-pairs; I've no idea how your linux/CUPS application allows you to do this.
- You don't require the 1B elements - hexadecimal 1B is the code-point value associated with the non-graphic Escape control-code character, which is used to introduce PCL escape sequences - in documentation it is usually shown by one of the 'place-holders' <Esc> or <esc>.
I've taken your latest code snippet, and:
- Made the relevant changes as per above.
- I've changed the initial vertical position, as your (zero) value may place the text in the unprintable region of the page.
- I've added the text "abcde" after the second font select, so that my printers (which don't have your Chinese font) will actually print something.
- I've also added '<Esc>E' escape sequences at head and tail, so the snippet is theoretically a 'complete' PCL job.
Attached is the resulting snippet02_x01.pcl file (within a .zip file to allow it to be attached here).
Here is a hexadecimal and character view of the content of that file:
Offset: dec Hexadecimal Text ----------- ------------------------------------------------ ---------------- 0000000000 1b 45 1b 26 6c 31 4f 1b 26 6c 32 36 41 1b 26 74 .E.&l1O.&l26A.&t 0000000016 38 33 50 1b 28 31 38 4e 1b 28 73 31 70 31 32 76 83P.(18N.(s1p12v 0000000032 34 73 30 62 33 37 33 36 36 54 1b 26 61 31 34 31 4s0b37366T.&a141 0000000048 37 48 1b 26 61 36 30 30 56 e6 9c aa e7 9f a5 e7 7H.&a600Væ.ªç.¥ç 0000000064 ae b1 e5 8f b7 1b 28 31 32 55 1b 28 73 31 70 31 ®±å.·.(12U.(s1p1 0000000080 32 76 34 73 30 62 34 31 34 38 54 1b 28 73 30 42 2v4s0b4148T.(s0B 0000000096 61 62 63 64 65 1b 45 abcde.E
...and here is an analysis of the PCL file:
Offset: dec Type Sequence Description ----------- --------------------- ---------------- ---------------------------------------------------- 0000000000 PCL Simple <Esc>E Printer Reset 0000000002 PCL Parameterised <Esc>&l1O Orientation: Landscape 0000000007 PCL Parameterised <Esc>&l26A Page Size: A4 0000000013 PCL Parameterised <Esc>&t83P Text Parsing Method: UTF-8 0000000019 PCL Parameterised <Esc>(18N Primary Font: Symbol Set (18N = Unicode) 0000000024 PCL Parameterised <Esc>(s1p Primary Font: Spacing: Proportional 0000000029 12v Primary Font: Height (12 points) 0000000032 4s Primary Font: Style (Condensed) 0000000034 0b Primary Font: Stroke Weight: Medium 0000000036 37366T Primary Font: Typeface (identifier = 37366) 0000000042 PCL Parameterised <Esc>&a1417H Cursor Position Horizontal (1417 decipoints) 0000000050 PCL Parameterised <Esc>&a600V Cursor Position Vertical (600 decipoints) 0000000057 UTF-8 data 0xe69caa.. [U+672a][U+77e5][U+7bb1][U+53f7] 0000000069 PCL Parameterised <Esc>(12U Primary Font: Symbol Set (12U = PC-850 Multilingual) 0000000074 PCL Parameterised <Esc>(s1p Primary Font: Spacing: Proportional 0000000079 12v Primary Font: Height (12 points) 0000000082 4s Primary Font: Style (Condensed) 0000000084 0b Primary Font: Stroke Weight: Medium 0000000086 4148T Primary Font: Typeface (4148 = Univers) 0000000091 PCL Parameterised <Esc>(s0B Primary Font: Stroke Weight: Medium 0000000096 UTF-8 data abcde 0000000101 PCL Simple <Esc>E Printer Reset
I hope that this explains the method in sufficient detail.
As mentioned above, I can't fully test this, since I don't have your (or any other) font with the required Chinese repertoire on my printers.
09-13-2016 06:35 AM
One of my printers (a loan Colour LaserJet Enterprise M553x) does actually include four 'double-byte' fonts:
Andale Mono WT J, Andale Mono WT K, Andale Mono WT T and Andale Mono WT S.
I've modified the snippet02_x01.pcl file, by changing the first PCL font selection sequence to select the latter of these four fonts, instead of your Chinese font.
i.e. the font selection sequence is <Esc>(s1p12v0s0b17007T instead of your <Esc>(s1p12v4s0b37366T sequence.
This is a scan of the relevant part of the page printed on that printer:
09-15-2016 07:13 PM
Hello,
Thank you very much for your help.
I finally were able to print the chinese characters with this format:
^[&l1O
^[&l26A
^[(12U^[(s0p5h0s0b4099T^[(s3B
^[(18C^[&t38p^[(s1p12v4s0b37366T^[&a1700H^[&a708V******** - V009 - ÌõÂë¶ÁÈ¡´íÎó
^[(12U^[(s1p12v4s0b4148T^[(s0B
^[(18C^[&t38p^[(s1p12v4s0b37366T^[&a850H^[&a1417VÈÕÆÚ / ʱ¼ä: ^[&a1984H^[&a1417V^[(12U^[(s1p18v4s0b4148T^[(s3B16.09.16 / 08:41:38^[(s0B
Where õÂë¶ÁÈ¡´íÎó is how is converted the Chinese characters when I convert from UtF-8 to GB2312 encoding.
Main problem here is that when I tried converting before to GB2312, the conversion wasn't done properly.
Many thanks
09-16-2016 03:01 AM
Good that you've now got things working on your system, using the Text Parsing Mode 38 ("Asian 1/2 byte") setting, with GB2312 encoding of the two-byte values.
Your PCL is (strictly) invalid, because the (two instances of) <Esc>&t38p should be <Esc>&t38P (since in each case they are the last or only contiguous sequence with the same root).
Taking that into account, and changing the font select to use the Andale Mono WT S font, I've set up a test file; this analysis shows the content:
0000000000 PCL Parameterised <Esc>&l1O Orientation: Landscape 0000000005 PCL Parameterised <Esc>&l26A Page Size: A4 0000000011 PCL Parameterised <Esc>(12U Primary Font: Symbol Set (12U = PC-850 Multilingual) 0000000016 PCL Parameterised <Esc>(s0p Primary Font: Spacing: Fixed 0000000021 5h Primary Font: Pitch (5 characters per inch) 0000000023 0s Primary Font: Style (Upright, solid) 0000000025 0b Primary Font: Stroke Weight: Medium 0000000027 4099T Primary Font: Typeface (4099 = Courier) 0000000032 PCL Parameterised <Esc>(s3B Primary Font: Stroke Weight: Bold 0000000037 PCL Parameterised <Esc>(18C Primary Font: Symbol Set (18C = Simplified Chinese GB2312-80) 0000000042 PCL Parameterised <Esc>&t38P Text Parsing Method: 1- or 2-byte Asian 8-bit 0000000048 PCL Parameterised <Esc>(s1p Primary Font: Spacing: Proportional 0000000053 12v Primary Font: Height (12 points) 0000000056 0s Primary Font: Style (Upright, solid) 0000000058 0b Primary Font: Stroke Weight: Medium 0000000060 17007T Primary Font: Typeface (17007 = Andale Mono WT S) 0000000066 PCL Parameterised <Esc>&a1700H Cursor Position Horizontal (1700 decipoints) 0000000074 PCL Parameterised <Esc>&a708V Cursor Position Vertical (708 decipoints) 0000000081 Data 0x2a2a2a.. ******** - V009 - [ccf5][c2eb][b6c1][c8a1][b4ed][cef3] 0000000111 PCL Parameterised <Esc>(12U Primary Font: Symbol Set (12U = PC-850 Multilingual) 0000000116 PCL Parameterised <Esc>(s1p Primary Font: Spacing: Proportional 0000000121 12v Primary Font: Height (12 points) 0000000124 4s Primary Font: Style (Condensed) 0000000126 0b Primary Font: Stroke Weight: Medium 0000000128 4148T Primary Font: Typeface (4148 = Univers) 0000000133 PCL Parameterised <Esc>(s0B Primary Font: Stroke Weight: Medium 0000000138 PCL Parameterised <Esc>(18C Primary Font: Symbol Set (18C = Simplified Chinese GB2312-80) 0000000143 PCL Parameterised <Esc>&t38P Text Parsing Method: 1- or 2-byte Asian 8-bit 0000000149 PCL Parameterised <Esc>(s1p Primary Font: Spacing: Proportional 0000000154 12v Primary Font: Height (12 points) 0000000157 0s Primary Font: Style (Upright, solid) 0000000159 0b Primary Font: Stroke Weight: Medium 0000000161 17007T Primary Font: Typeface (17007 = Andale Mono WT S) 0000000167 PCL Parameterised <Esc>&a850H Cursor Position Horizontal (850 decipoints) 0000000174 PCL Parameterised <Esc>&a1417V Cursor Position Vertical (1417 decipoints) 0000000182 Data 0xc8d5c6.. [c8d5][c6da] / [cab1][bce4]: 0000000195 PCL Parameterised <Esc>&a1984H Cursor Position Horizontal (1984 decipoints) 0000000203 PCL Parameterised <Esc>&a1417V Cursor Position Vertical (1417 decipoints) 0000000211 PCL Parameterised <Esc>(12U Primary Font: Symbol Set (12U = PC-850 Multilingual) 0000000216 PCL Parameterised <Esc>(s1p Primary Font: Spacing: Proportional 0000000221 18v Primary Font: Height (18 points) 0000000224 4s Primary Font: Style (Condensed) 0000000226 0b Primary Font: Stroke Weight: Medium 0000000228 4148T Primary Font: Typeface (4148 = Univers) 0000000233 PCL Parameterised <Esc>(s3B Primary Font: Stroke Weight: Bold 0000000238 Data 16.09.16 / 08:41:38 0000000257 PCL Parameterised <Esc>(s0B Primary Font: Stroke Weight: Medium
... and the result of sending this to the LaserJet M553x is as follows:
