I'm going to attach a .ppd file (from one of the printers we have around here) that cups misparses. The .ppd spec says (page 23): The value is composed of printable 7-bit ASCII byte codes, possibly sepa- rated by spaces and tabs into multiple components. It is terminated by a newline, or by a slash, in the case of a translation string. Which isn't very clear about internal whitespace, but the fact that HP shipped this file indicates that practically speaking CUPS needs to strip it. This causes gnome-print to crash because the ->defchoice for the PaperSize option doesn't point to one of the defined PaperSize values for the print. I'll work around this in gnome-print (and fix the crash) but it would be good to get this fixed in the CUPS library as well.
Created attachment 90322 [details] Offending PPD file
Since it may not be clear, the problem with this file is that the: *DefaultPageSize: Letter Has a trailing space. (I miswrote PageSize instead of PaperSize above)
Created attachment 90356 [details] cups-1.1.17-space.patch Is this the kind of patch you're after? I'm not quite sure how to provoke the gnome-print crash you see.
No, I don't think that's the right field, the option would be (from memory) PageSize Letter/Letter: <<asdfasdfa>> ^^^^^^^^^^^^^ While this is: DefaultPageSize: Letter ^^^^^^^ It's a StringValue in the terminology of the .ppd spec. It might be best to just to send this bug upstream unless you feel comfortable with the .ppd parsing code. I've worked around it in gnome-print now. (So, if you are using the latest gnome-print from the tree, it won't be possible to reproduce the problem.)
http://www.cups.org/newsgroups.php?s3332+gcups.general+v3341