Closed Bug 35910 Opened 24 years ago Closed 24 years ago

Fail to print CJK page in Linux

Categories

(Core :: Internationalization, defect, P1)

x86
Linux
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: teruko, Assigned: yueheng.xu)

References

()

Details

(Keywords: relnote, Whiteboard: [nsbeta2+])

When you tried to print CJK page in Linux, the printer give you the
error.  

Steps of reproduce
1. Go to above URL
2. Select menu View|Print to send to printer

The paper prints out, but it prints the following error message.
"Error: /undefined in Unicodedict
 Operand stack:
    12469
 Execution stack:
    %interp_exit  .runexec2  --nostringval--  --nostringval--  --nostringval--
 Dictionary stack:
    --dict:776/809--  --dict:0/20  -dict:75/200--
 Current allocation mode is local
 Current file position is 104166  "

I am using Redhat Linux 6.0 + Japanese locale.  I tested printing in beta1
Linux build.  It printed as garbage, but it printed.  

The bug 30176 mentions "Fail to print Chinese webpages".  This bug is fixed,
but we do not have the right environment to test this.
This is not a bug, but a design API. The undefined /Unicodedict
is a PostScript font dictionary that the users must provide, to map to the
available fonts they have in your platform. If they do not have such a
environment, then they need a post processing utility to insert font
data into this PostScript file, and map the /Unicodedict to the font
data just inserted.

For example, if the page to be printed have used unicode U1111 and U2222,
you need 

/Unicodedict 
<< U1111, localU1111
   U2222, localU2222
>> 

where localU1111, localU2222 are font rendering procedures in your local 
environemnt. This could be printer vendor specific.

If you do not have such an environement, then you need have a post-processing
utility to define and insert those local procedure in the PostScript file 
itself before it is printed. 

More documents are at http://linux.webchina.org

Status: NEW → ASSIGNED
It is not acceptable to check in code that default to something most of the user
do not have. Please fix this. You should define a default /Unicodedict which
behave normally and let your post processing script to replace it to it's real
implementation. The bottom line is, if the users have install nothing else (no
post processing) and the CJK font is not avaiable on the printer, the page
should still be print and the English part and picture, <HR> should still print
normal while the CJK text may render as garbage or blank. Producing a postscript
error in the *default setting* is simply not a acceptable design.
Mark P1 blocker since this block any Linux print testing.


Assignee: ftang → yueheng.xu
Severity: normal → blocker
Status: ASSIGNED → NEW
Keywords: beta2
Priority: P3 → P1
Putting on [nsbeta2+] radar.
Keywords: beta2nsbeta2
Whiteboard: [nsbeta2+]
A fix has been submitted for review. The default behavior now will print all
unicode with non-zero high-byte into a single chinese character "han" to 
indicate this is likely a CJK character and need CJK font support. To change
the default behavior, need define HAS_UNICODEDICT in nsPostScriptObj.cpp and
provide a post processing filter to supply /Unicodedict and font rendering 
procedure.
Status: NEW → ASSIGNED
I tested this in 2000042109 Linux build.  The page will sent to the printer, but
CJK characters are printed as one chinese character "Han".
yueheng.xu@intel.com-
does that make sense to also check in your post processing filter into mozilla ?
We need release note about how to set up the filter to get printing work.
Let the release note point to my document at http://linux.webchina.org

Right now, it works for my environment. Others need following steps to make it
work:

0. have Mozilla Print to a file, such as

     mydoc.ps

1. have my filter ttf2ps installed ( right now need resolve license mgmt 
   approval before check in).
2. have a TrueType font file installed at the same directory as above filter.
   If you have a user license of TurboLinux Chinese 4.0, get the file 
   htsong.ttf from there.
3. run my filter like this:
 
    ttf2ps mydoc.ps > mydoc1.ps

4. Now send mydoc1.ps to a PostScript Printer, or to a ghoscript interpreter
   for final print out.

5. You may also modify my above steps to make it as a pipe command in the
   mozilla print menu. 


Target Milestone: --- → M17
I tested this in 2000-05-08 Linux build.  After I send the page to printer, 
"EROOR:undefinedresult: OFFENDING COMMAND: colorimage
STACK: 3 false {correntfile rowdata readhexstringpop} [10 0 0 1 0 0 ]
8 1 10" in the page.  Printing does not work even English page.
Teruko-san,

We should file a new bug about the colorimage problem.
It's not I18N issue.

Yueheng,

I could not get your ttf2ps tool from the web site,
http://linux.webchina.org/printing/tool.html.
Could you tell me the exact point of the tool or
could you send the tool to me?
Katakai-san, I tested more in the different page.  I got the error in 
http://home.netscape.com/  http://home.netscape.com/ja page.
I logged the different bug about that in bug 40604.

I just call yueheng.xu. He change his job and are no longer working on mozilla.
he said he will mail to mozilla-i18n his ttf2ps source code next week.
we should release note where can we find the filter and how to set it up. But 
for Mozilla, we should mark this bug fixed. 
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Keywords: relnote
Resolution: --- → FIXED
This is fixed.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.