media defs can contain dot, comma and hash -

Johan Henselmans johan at netsense.nl
Wed Oct 28 12:47:21 PDT 2009


Michael Sweet schreef:
> On Oct 28, 2009, at 7:03 AM, Johan Henselmans wrote:
>> http://www.cups.org/documentation.php/ref-ppdcfile.html says:
>>
>> #media defs
>> =======================
>> The name may only contain letters, numbers, and the underscore and may 
>> not exceed 40 characters in length. The user text, if supplied, may not 
>> exceed 80 characters in length.
>> ========================
>>
>>
>> Does that mean the dot and the comma are included, and the hash (-)?
> 
> OK, so this documentation is in error.  Can you file a bug report on this?
>

I did not think it was in error. It was just possible to interpret it in 
   different ways. It was not meant to critize, just a question.


>     http://www.cups.org/str.php
> 
> What it *should* say is this:
> 
>     The name may contain up to 40 ASCII characters within the range of decimal 33
>     to decimal 126 inclusive, except for the characters comma (44), slash (47) and
>     colon (58).  The user text, if supplied, may not exceed 80 bytes in length.
> 
> You *can't* use the comma in the name because that is used by CUPS as a value delimiter. Appendix B of the PPD specification defines the standard PageSize names to use and the convention for new names and qualifiers, e.g. Letter.FullBleed would be a qualified version of Letter that has margins of 0, and cupstestppd warns when you use a non-conforming name.
> 

Ahh, thanks, so the way to do it is: create your own printer.drv and 
media.defs, then do a "ppdc printer.drv" and then "cupsctestppd 
printer.ppd" on the resulting printer.ppd?

(I just did it and discovered an error in my version string which was 
not 8.3 but 8.4).

Thanks.


>> In some worlds one would say that dot, comma and hash are part of the 
>> numerical world.
> 
> Not in the programming world when defining allowable *characters*.
> 
> ___________________________________________________
> Michael Sweet, Senior Printing System Engineer
> 
> 
> 
Johan Henselmans




More information about the cups-devel mailing list