[Kde-print-devel] [Bug 142220] New: KPrinter fails to parse PPDs and shows incorrect printer options, but CUPS itself works correctly with same PPDs

Andreas Koch ahk at arcor.de
Mon Feb 26 12:49:36 CET 2007


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=142220         
           Summary: KPrinter fails to parse PPDs and shows incorrect printer
                    options, but CUPS itself works correctly with same PPDs
           Product: kdeprint
           Version: unspecified
          Platform: Compiled Sources
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: general
        AssignedTo: kde-print-devel kde org
        ReportedBy: ahk arcor de


Version:            (using KDE KDE 3.5.5)
Installed from:    Compiled From Sources
Compiler:          gcc 4.1.1 
OS:                Linux

Recent versions of KDEPrint appear to be no longer able to parse PPDs that were handled successfully before and continue to be processed successfully by CUPS 1.2.6.

Applications such as kprinter output a message

    kdeprint: WARNING: PPD syntax error, PPD parse failed

and then no longer show the correct options in the printer-specific options dialog. CUPS itself continues to handle these same PPDs correctly and processes the right options when printing from the command line.

As an example, I attach a PPD for a HP LaserJet 2430 DTN PostScript printer. To demonstrate the problems, consider the selection of the paper input tray. The PPD defines the following trays, which are also recognized by lpoptions -l

...
InputSlot/Media Source: *AutomaticallySelect Tray1 Tray2 Tray3_500
...

However, kprinter no longer shows these names in the Paper source property, but instead uses the (arbitrary?) names Upper Tray, Lower Tray, Multi-Purpose Tray and Large-Capacity Tray (see attached screenshot). Selecting one of these options has no effect, sheets are always pulled from the default defined in the PPD (Tray3_500).

I have checked a few more reports in bugs.kde.org. Initially #100201 seemed to be most appropriate. However, that bugs states:

``More recent versions of CUPS have become more strict with PPD parsing. They wont any longer tolerate PPDs which dont comply with the Adobe PPD Specification.''
 
While cupstestppd does indeed find some errors in the PPD:

/etc/cups/ppd/Tengwar.ppd: FAIL
      **FAIL**  Bad Resolution choice 600x600x2dpi!
                REF: Page 84, section 5.9
        WARN    Line 491 only contains whitespace!
        WARN    DefaultLeadingEdge has no corresponding options!
        WARN    DefaultHalftoneType has no corresponding options!
        WARN    Protocols contains PJL but JCL attributes are not set.
                REF: Pages 78-79, section 5.7.

all options are shown correctly in the CUPS printer configuration page and command line printing from CUPS itself works _perfectly_. For example, to select the input source,

    lp -d tengwar -o media=tray2 test1.pdf

does have the desired effect. So the difficulties appear to be at the KDE side of things. The same effect also occurs with other PPDs for the same printer (e.g., the one in the foomatic data base) or PPDs for different printers (e.g., one for a Lexmark Optra T610n printer, which also worked correctly in prior versions of KDE).


More information about the Kde-print-devel mailing list