Repository navigation
JCLOpenUI/cupsJobTickets do not work #2570
Description
Version: 1.3-current
CUPS.org User: franz.pfoertsch.brose
Today I tried to check out the JCLOpenUI Custom options.
It seems there is something broken.
I created this Option in the ppd-file and restarted the cupsd
*% Base JCL key code option
*JCLOpenUI 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
I exported the ppd via cupsaddsmb and teh option get rebuilded, but the commands inside of the option got cut at Mailb
---8<---ppd in windows-----
*% Commented out for CUPS Windows Driver...
*%JCLBegin: "<1B>%-12345X@PJL JOB<0A>"
*% Commented out for CUPS Windows Driver...
*%JCLToPSInterpreter: "@pjl ENTER LANGUAGE = Postscript <0A>"
*% Commented out for CUPS Windows Driver...
*%JCLEnd: "<1B>%-12345X@PJL EOJ <0A><1B>%-12345X"
*% Base JCL key code option
*JCLOpenUI JCLMailbox/Mailbox: PickOne
*OrderDependency: 0 JCLSetup *JCLMailbox
*DefaultJCLMailbox: None
*% Changed for CUPS Windows Driver...
*JCLMailbox None/No mailbox: "%cupsJobTicket: JCLMailbox=None
"
*End
*% Changed for CUPS Windows Driver...
*JCLMailbox 0: "%cupsJobTicket: JCLMailbox=0: "@pjl COMMENT CANPJL SET DEVICE=MAILB
"
*End
*% Changed for CUPS Windows Driver...
*JCLMailbox 1: "%cupsJobTicket: JCLMailbox=1: "@pjl COMMENT CANPJL SET DEVICE=MAILB
"
*End
*% Changed for CUPS Windows Driver...
*JCLMailbox 2: "%cupsJobTicket: JCLMailbox=2: "@pjl COMMENT CANPJL SET DEVICE=MAILB
"
*End
*% Changed for CUPS Windows Driver...
*JCLMailbox 3: "%cupsJobTicket: JCLMailbox=3: "@pjl COMMENT CANPJL SET DEVICE=MAILB
"
*End
*% Changed for CUPS Windows Driver...
*JCLMailbox 4: "%cupsJobTicket: JCLMailbox=4: "@pjl COMMENT CANPJL SET DEVICE=MAILB
"
*End
*% Changed for CUPS Windows Driver...
*JCLMailbox 5: "%cupsJobTicket: JCLMailbox=5: "@pjl COMMENT CANPJL SET DEVICE=MAILB
"
*End
*JCLCloseUI: *JCLMailbox
---8<---ppd in windows-----
After this I printed out something from windows and got this:
two cupsJobTickets in one line.
At the source in scheduler/ipp.c it is defined as %cupsJobTicket: attr1=value1 attr2=value2 ... attrN=valueN
what is the right way?
----8< spooljob at /var/spool/cups/d....
%!PS-Adobe-3.0
%cupsJobTicket: JCLMailbox=5: %cupsJobTicket: job-hold-until=no-hold
%cupsJobTicket: job-sheets=none,none
%!PS-Adobe-3.0
%%Title: Microsoft Office Outlook - Memoformat
%%Creator: PScript5.dll Version 5.2.2
%%CreationDate: 10/28/2007 1:19:55
%%For: pfoerfr
%%BoundingBox: (atend)
%%Pages: (atend)
%%Orientation: Portrait
After the printout I got the following on my file device:
ESC%-12345X@PJL
@pjl JOB NAME = "smbprn.00000081 Microsoft Office Outlook - Memoformat" DISPLAY = "307 pfoerfr smbprn.00000081 Microsoft Office Outlook - Memoformat"
@pjl RDYMSG DISPLAY = "307 pfoerfr smbprn.00000081 Microsoft Office Outlook - Memoformat"
@pjl ENTER LANGUAGE = Postscript
%!PS-Adobe-3.0
%%Title: Microsoft Office Outlook - Memoformat
%%Creator: PScript5.dll Version 5.2.2
%%CreationDate: 10/28/2007 1:19:55
%%For: pfoerfr
%%Orientation: Portrait
%%PageOrder: Ascend
%%DocumentNeededResources: (atend)
%%DocumentSuppliedResources: (atend)
%%DocumentData: Clean7Bit
%%TargetDevice: (iR C2880/C3380) (3010.103) 0
All additional Information got lost, how can I get my PJL information through cups?
Activity
michaelrsweet commentedon Oct 29, 2007
CUPS.org User: mike
Please post a complete PPD file.
michaelrsweet commentedon Oct 29, 2007
CUPS.org User: franz.pfoertsch.brose
I modified my PPD, after this it seems to work
*JCLBegin: "<1B>%-12345X@PJL JOB<0A>"
*JCLToPSInterpreter: "@pjl ENTER LANGUAGE = Postscript <0A>"
! *JCLEnd: "<1B>%-12345X@PJL EOJ <0A><1B>%-12345X"
*% Base JCL key code option
! *JCLOpenUI JCLMailbox/Mailbox: PickOne
*OrderDependency: 10 JCLSetup *JCLMailbox
*DefaultJCLMailbox: None
*JCLMailbox None/No mailbox: ""
! *JCLMailbox 0/0: "@pjl COMMENT CANPJL SET DEVICE=MAILBOX <0A>@pjl COMMENT CANPJL SET MAILBOXNUMBER=O <0A>"
! *JCLMailbox 1/1: "@pjl COMMENT CANPJL SET DEVICE=MAILBOX <0A>@pjl COMMENT CANPJL SET MAILBOXNUMBER=1 <0A>"
! *JCLMailbox 2/2: "@pjl COMMENT CANPJL SET DEVICE=MAILBOX <0A>@pjl COMMENT CANPJL SET MAILBOXNUMBER=2 <0A>"
! *JCLMailbox 3/3: "@pjl COMMENT CANPJL SET DEVICE=MAILBOX <0A>@pjl COMMENT CANPJL SET MAILBOXNUMBER=3 <0A>"
! *JCLMailbox 4/4: "@pjl COMMENT CANPJL SET DEVICE=MAILBOX <0A>@pjl COMMENT CANPJL SET MAILBOXNUMBER=4 <0A>"
! *JCLMailbox 5/5: "@pjl COMMENT CANPJL SET DEVICE=MAILBOX <0A>@pjl COMMENT CANPJL SET MAILBOXNUMBER=5 <0A>"
*JCLCloseUI: *JCLMailbox
*% Optional 3500 sheets large capacity trays.
--- 68,87 ----
*JCLBegin: "<1B>%-12345X@PJL JOB<0A>"
*JCLToPSInterpreter: "@pjl ENTER LANGUAGE = Postscript <0A>"
! *% JCLEnd: "<1B>%-12345X@PJL EOJ <0A><1B>%-12345X"
*% Base JCL key code option
! *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
I only changed from:
*JCLMailbox 0: "@pjl COMMENT CANPJL SET DEVICE=MAILBOX<0A>@pjl COMMENT CANPJL SET MAILBOXNUMBER=O<0A>"
to
*JCLMailbox 0/0: "@pjl COMMENT CANPJL SET DEVICE=MAILBOX <0A>@pjl COMMENT CANPJL SET MAILBOXNUMBER=O <0A>"
there is something wrong with the / ...
michaelrsweet commentedon Nov 3, 2007
CUPS.org User: franz.pfoertsch.brose
I am not a programmer, but in my opinion the bug is in the line 294 of the file adminutil.c located.
--8<---- snip
293
294 if (sscanf(line, "%40s%[ \t]%40[^/]", option, choice) != 2)
295 {
296 snprintf(line, sizeof(line),
297 _cupsLangString(language,
--8<---- snip
the sscanf looks for a pattern like '/' but without the slash (/), garbage is stored in the string and the next steps in processesing goes wrong.
michaelrsweet commentedon Nov 30, 2007
CUPS.org User: mike
Fixed in Subversion repository.
michaelrsweet commentedon Nov 30, 2007
"str2570.patch":
Index: cups/adminutil.c
--- cups/adminutil.c (revision 7077)
+++ cups/adminutil.c (working copy)
@@ -291,7 +291,7 @@
return (NULL);
}
snprintf(line, sizeof(line),
_cupsLangString(language,