[cups.general] pdftops locale problem
Klaus Singvogel
kssingvo at suse.de
Tue Jun 10 05:21:03 PDT 2008
Christoph Litauer wrote:
> Hi,
>
> I have a question concerning cups 1.1.23 running on SuSE Linux
> Enterprise Server 10 SP1.
>
> When printing from NeoOffice (OpenOffice for Mac) to any printer on my
> printserver I just get errors like:
> ERROR: undefined
> OFFENDING COMMAND: 56,88
>
> I tracked this down to the following issue: NeoOffice generates pdf code
> with font definitions containing floating point numbers (e.g.
> http://www.uni-koblenz.de/~litauer/cups/1.pdf). This file is filtered by
> pdftops which - depending on some locale settings - converts the dot
> inside of floats to a comma (e.g. 56.88 => 56,88).
cups-1.1.x and printing with a non-C locale was always a mess. Fixing
one issue, opens the opposite one.
You discovered here:
http://www.cups.org/str.php?L1194
https://bugzilla.novell.com/show_bug.cgi?id=41006
and later:
https://bugzilla.novell.com/show_bug.cgi?id=227205
> I can reproduce this error via:
>
> $ cat 1.pdf | (env PPD=/etc/cups/ppd/pdfmail.ppd LANG=de_DE
> /usr/lib/cups/filter/pdftops 11111 someuser sometitle 1 "") | grep 56,
> DEBUG: pdftops - copying to temp print file
> "/var/spool/cups/tmp/484e68d911d31"
> DEBUG: pdftops - opened PPD file "/etc/cups/ppd/pdfmail.ppd"...
> DEBUG: pdftops - level = 2, width = 595, length = 842
> [1 0 0 1 56,88 774,56] cm
> The conversion doesn't take place if I ommit the PPD environment
> variable or define another locale (LANG) - unfortunately I cannot
> control this behaviour on the clients. This leads to the following
> questions:
> 1.) Why are the floating numbers only converted it environment variable
> PPD is set?
The glibc is doing this.
If you want to print the text "€" then locale says that the Euro-Sign
should be printed and not a different symbol.
But the very same module also converts your output of numbers from
"5.1" to "5,1" as your country says that this is official sign for
number separation. :-)
> 2.) What can I do against this conversion?
Don't use any other locale than LANG=C or LANG=POSIX
You might want to edit /etc/init.d/cups and add a line:
LANG=C
even a line could help:
LC_NUMBER=POSIX
Note: I haven't tested my advice, but I think it "fix" it.
Regards,
Klaus.
--
Klaus Singvogel - Maxfeldstr. 5 - 90409 Nuernberg - Germany
Phone: +49-911-74053-0
GnuPG-Key-ID: 1024R/5068792D 1994-06-27
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg)
More information about the cups
mailing list