printing UTF-8 text mixed with PCL code
Helge Blischke
h.blischke at acm.org
Sun Jul 17 09:21:31 PDT 2011
Matthias Apitz wrote:
>> >> Well, why the conversion to PostScript at all? From your post I guess
>> >> that formerly the "text mixed with PCL code" has been transferred to
>> >> the printer(s) without furteher manipulation.
>> >> Why not converting the UTF-8 text back to ISO8859-1 for printing?
>> >
>> > Because we (and the customer) want to print not only ISO 8859-1 chars.
>> > This (converting back to ISO) is the actual dirty fallback solution.
>> >
>> > matthias
>>
>> Well, when you do font handling etc. using PCL commands, that means you
>> rely on the printer's PCL interpreter.
>> As for HP printers, each printer model supports a subset of a fairly
>> large set of "character sets" which can be switched by PCL commands. So
>> for a real printer you *need* to convert the UTF-8 text "back" to the
>> appropriate character sets.
>>
>
> We checked this. The installed set of chars in the printer is very
> limited and not usefull for printing converted UTF-8 chars. We need
> a Postscript "picture" which includes the very few big font chars
> and OCR-B chars.
>
> matthias
Then, I think, you cannot tweak CUPS's texttops filter to do this. You'll
need a new filter that converts the PCL commands to appropriate PostScript
statements (it shouldn't be too hard as you use only a very limited PCL
subset) and properly renders the UTF-8 coded text. There are examples how to
do that, provided the used fonts contain the needed glyphs. An example how
that might be done can be seen in PS output of Mozilla browsers before they
switched to using Cairo as a rendering library.
Helge
More information about the cups
mailing list