Red Hat Bugzilla – Bug 147292
Fails importing (attached) .PPD correctly, claims success
Last modified: 2007-11-30 17:10:59 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5)
Description of problem:
system-config-printer fails to import the attached PPD-file.
The PPD has Macintosh-style lineendings (0x0d instead of 0x0a). The
parser in queueTree.py expects unix or windows newlines (thus views
the PPD as one line long).
(For the record: Installing the same PPD via CUPS webinterface
http://localhost:631/ works fine.)
in queueTree.py, exchange the line: f = file (filename)
with: f = file (filename, 'rU')
From python library reference:
"In addition to the standard fopen() values mode may be 'U' or 'rU'.
If Python is built with universal newline support (the default) the
file is opened as a text file, but lines may be terminated by any of
'\n', the Unix end-of-line convention, '\r', the Macintosh convention
or '\r\n', the Windows convention. All of these external
representations are seen as '\n' by the Python program. If Python is
built without universal newline support mode 'U' is the same as normal
text mode. "
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Open system-config-printer, import the attached PPD.
2. Dialog claims "PPD imported"
Actual Results: Trying to add a printer reveals that Oki B4300 isn't
Expected Results: Either:
1) (preferred) A PPD with macstyle newlines should be possible to
import, see solution in full description.
2) The installer shouldn't claim "PPD imported" when it didn't parse
the file (specifically Manufacturer and ShortNickName) correctly.
Created attachment 110703 [details]
I can confirm the same problem with a PCL ppd sent to me by the Ricoh
development team. If I copy the PCL ppd for the printer to the
/usr/share/cups/model directory, restart cups and then add and configure the
printer via the cups web interface I can print just fine to the printer. If
import the ppd via the system settings / import ppd it does not print properly
(dumps unfiltered postscript data to the printer) to the printer. Ricoh is
preparing an install document for linux that can't use this import feature cuz
it just plain doesn't work properly.
Fixed in CVS. Thanks.