pdftops locale problem

Helge Blischke h.blischke at srz.de
Tue Jun 10 05:01:52 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).
> 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?
> 2.) What can I do against this conversion?
> 
> Any help is greatly appreciated, thanks in advance!
> 

Either force CUPS to run under a locale like C or POSIX, or use
the "alternate pdftops filter" (see the links on cups.org) and make sure
to use xpdf's pdftops utility at least version 3.02. That does
the conversion correctly regardless of the selected locale.

The said filter is compatible with CUPS versions 1.1.19 and higher.

Helge


-- 
Helge Blischke
Softwareentwicklung

H.Blischke at acm.org




More information about the cups mailing list