PPD custom options

Kurt Pfeifle k1pfeifle at gmx.net
Sat Oct 27 09:43:25 PDT 2007


I also found one missing sub-string. See below....

Kurt Pfeifle wrote:
> Franz Pfoertsch wrote:
>> Hello
>>
>> I need some more explanation of the ppd custom options http://www.cups.org/documentation.php/spec-ppd.html
>>
>> I try to print into a "mailbox" of a multifunction device from 
>> Canon (ir C2880). All selections are done by Canon PJLs.
>>
>> so I expandet the PPD with 
>>
>> + *% === Job Control Language ==
>> +
>> + *JCLBegin: "<1B>%-12345X at PJL JOB<0A>"
>> + *JCLToPSInterpreter: "@PJL ENTER LANGUAGE = Postscript <0A>"
>> + *% JCLEnd: "<1B>%-12345X at PJL EOJ <0A><1B>%-12345X"
>> +
>> +
>> + *% Base JCL key code option
>> + *OpenUI JCLMailbox/Mailbox: PickOne

The last line should be:

     *JCLOpenUI JCLMailbox/Mailbox: PickOne

not:

     *OpenUI JCLMailbox/Mailbox: PickOne

>> + *OrderDependency: 10 JCLSetup *JCLMailbox
>> + *DefaultJCLMailbox: None
>> + *JCLMailbox None/No mailbox: ""
>> + *JCLMailbox 0: "@PJL COMMENT CANPJL SET DEVICE=MAILBOX<0A>@PJL COMMENT CANPJL SET MAILBOXNUMBER=O<0A>"
>> + *JCLMailbox 1: "@PJL COMMENT CANPJL SET DEVICE=MAILBOX<0A>@PJL COMMENT CANPJL SET MAILBOXNUMBER=1<0A>"
>> + *JCLMailbox 2: "@PJL COMMENT CANPJL SET DEVICE=MAILBOX<0A>@PJL COMMENT CANPJL SET MAILBOXNUMBER=2<0A>"
>> + *JCLMailbox 3: "@PJL COMMENT CANPJL SET DEVICE=MAILBOX<0A>@PJL COMMENT CANPJL SET MAILBOXNUMBER=3<0A>"
>> + *JCLMailbox 4: "@PJL COMMENT CANPJL SET DEVICE=MAILBOX<0A>@PJL COMMENT CANPJL SET MAILBOXNUMBER=4<0A>"
>> + *JCLMailbox 5: "@PJL COMMENT CANPJL SET DEVICE=MAILBOX<0A>@PJL COMMENT CANPJL SET MAILBOXNUMBER=5<0A>"
>> + *JCLCloseUI: *JCLMailbox
>> +
> 
> Not sure if the "COMMENT" keyword above is correct (because usually
> that means the PJL interpreter would handle the whole line as a
> comment only -- cupsaddsmb may do the same and thererfore not trans-
> late it into a *cupsJobTicket syntax.
> 
>> Now I configured the printer and published the driver with cupsaddsmb/webinterface to samba.
>> Every thing  works fine and I am really happy with it.
>>
>> Now I stopped the printer and printed something into the mailbox nr 5 and  I got the following datastream into /var/spool/cups/d....
>>
>> ---8<----
>> %!PS-Adobe-3.0
>> %cupsJobTicket: job-hold-until=no-hold
>> %cupsJobTicket: job-sheets=none,none
>> @PJL COMMENT CANPJL SET DEVICE=MAILBOX
>> @PJL COMMENT CANPJL SET MAILBOXNUMBER=5
>> %!PS-Adobe-3.0
>> %%Title: Microsoft Office Outlook - Memoformat
>> %%Creator: PScript5.dll Version 5.2.2
>> ---8<----
>>
>> No I thought I have won, but the datastream transferd to the printer looks like this:
>> ---8<----
>>
>> ESC%-12345X at PJL
>> @PJL JOB NAME = "smbprn.00000073 Microsoft Office Outlook - Memoformat" DISPLAY = "293 pfoerfr smbprn.00000073 Microsoft Office Outlook - Memoformat"
>> @PJL RDYMSG DISPLAY = "293 pfoerfr smbprn.00000073 Microsoft Office Outlook - Memoformat"
>> @PJL ENTER LANGUAGE = Postscript
>> %!PS-Adobe-3.0
>> %%For: (pfoerfr)
>> %%Title: (smbprn.00000073 Microsoft Office Outlook - Memoformat)
>> %RBINumCopies: 1
>> %%Pages: (atend)
>> %%BoundingBox: (atend)
>> %%EndComments
>> @PJL COMMENT CANPJL SET DEVICE=MAILBOX
>> @PJL COMMENT CANPJL SET MAILBOXNUMBER=5
>> %!PS-Adobe-3.0
>> %%Title: Microsoft Office Outlook - Memoformat
>> %%Creator: PScript5.dll Version 5.2.2
>> %%CreationDate: 10/25/2007 15:11:51
>> %%For: pfoerfr
>> %%BoundingBox: (atend)
>> %%Pages: (atend)
>> %%Orientation: Portrait
>> %%PageOrder: Ascend
>> ---8<----
>>
>> and the printer printed PJL error
>>
>> I copied the @PJL COMMENT CANPJL .. lines into the @PJL header and everything works fine.
>>
>> Now my questions
>> a) Did I make a mistake?
>> b) I that the wrong tool for the job?
>> c) Is there a bug inside of pstops
> 
> 
> To know for sure, one would have to see the complete PPD. The way it
> works is this:
> 
> (a) you add the JCL/PJL sections to the PPD as is used by CUPS.
> (b) cupsaddsmb converts these PJL lines into "*cupsJobTicket" lines
>     for the PPD Samba is offering to Windows clients.
> (c) once a job arrived from the Windows client, all cupsJobTicket
>     lines are re-converted into PJL header lines by CUPS.
> (d) pstops should leave untouch all PJL header lines it sees, and
>     just pass them down the line towards the device (which is the
>     only instance in the whole process chain that knows how to correctly
>     interpret their contents).
> 
> Did you add *OrderDependency lines with the right values to _all_ your
> "*OpenUI ... *CloseUI" sections describing the PJL lines?
> 
> Otherwise, you may have triggered a bug in CUPS and/or cupsaddsmb.

-- 
Kurt Pfeifle
System & Network Printing Consultant ---- Linux/Unix/Windows/Samba/CUPS
Infotec Deutschland GmbH  .....................  Hedelfinger Strasse 58
A RICOH Company  ...........................  D-70327 Stuttgart/Germany




More information about the cups mailing list