Problem with job names on remote ipp printer

Jakub j.boguslawski at post.pl
Mon Sep 10 03:35:19 PDT 2007


> > Jakub wrote:
> > >> Jakub wrote:
> > >>>> Jakub wrote:
> > >>>>
> > >>>>> I am using openSuse 10.2 with Cups 1.27. I have Develop INEO+ 250
> > >>>>> printer.
> > >>>> Nice little thing, that  :-)
> > >>>>
> > >>>>> I have add this printer to local Cups server as remote ipp
> > >>>>> queue. Printer driver was installed from PPD file. Cups works great I
> > >>>>> am printing booklets with correctly filtered options. I have one
> > >>>>> problem. Cups stores job names correctly, but these names are lost
> > >>>>> when they are stored on printer. Every job which is coming from cups
> > >>>>> appears on remote queue as "Unknown". I haven't got this problem when
> > >>>>> I am printing from windows, unfortunately :( What am I doing wrong?
> > >>>>> Is it a Cups bug or it possible to add some conf options to forward
> > >>>>> job names correctly.
> > >>>> What happens if you print from the commandline using the "-t", resp.
> > >>>> the "-T" parameter?
> > >>>>
> > >>>>    lp -d ineo -t "This is the job title" /path/to/file
> > >>>>    lpr -P ineo -T "This is the job title" /path/to/file
> > >>>>
> > >>>> --
> > >>>> Kurt Pfeifle
> > >>>> System & Network Printing Consultant ---- Linux/Unix/Windows/Samba/CUPS
> > >>>> Infotec Deutschland GmbH  .....................  Hedelfinger Strasse 58
> > >>>> A RICOH Company  ...........................  D-70327 Stuttgart/Germany
> > >>> I am printing with exactly the same command. Maybe it is the bug in
> > >>> printer firmware but why jobs printed from windows have correct names.
> > >>> It is big problem form me.
> > >> The job names usually are transferred to the printer in a "PJL header"
> > >> to the jobfile. CUPS normally has no problems to get that right -- provi-
> > >> ded the PPD used to setup the queue has valid code to generate such a
> > >> PJL header. It may well be that this is not the case for you.
> > >>
> > >> Which driver do the Windows clients use? (And do they also print via
> > >> CUPS, or do they print directly to the ineo?)
> > >>
> > >>> I am printing results of some analysis with
> > >>> id in file name. I am executing scripts from java, I haven't got
> > >>> information if the result was printed correctly I can only say that
> > >>> the job was delivered to printer. I would be able to solve the problem
> > >>> if I would have correct job names in printers log.
> > >> I recommend you the following:
> > >>
> > >>   * go to http://techbase.kde.org/Projects/KDEPrint/Tools%2BUtilities
> > >>   * read that, and grab my "2dir" and "2file" backend scripts there
> > >>
> > >> You can use these to set up a virtual CUPS printers with one of these
> > >> backends which will write the jobfile (after all filtering is done) to
> > >> disk instead of sending it off to a printmachine. Use the same PPD for
> > >> the virtual printer(s). Let both, the Windows clients and your command-
> > >> line print to these queues.
> > >>
> > >> Look at the differences in the files (mainly, the headers. Draw your
> > >> conclusions from that.
> > >>
> > >>
> > >> --
> > >> Kurt Pfeifle
> > >> System & Network Printing Consultant ---- Linux/Unix/Windows/Samba/CUPS
> > >> Infotec Deutschland GmbH  .....................  Hedelfinger Strasse 58
> > >> A RICOH Company  ...........................  D-70327 Stuttgart/Germany
> > >
> > > Thank you very much for such quick answer. I've followed your instructions
> > > and have installed 2dir printer, using the same ppd file as in my ineo
> > > printer. The printer looks ok but when I try to print some documents I am
> > > receiving message:
> > >
> > > dirprinter "/usr/lib64/cups/backend/2dir failed"
> >
> >
> > Well, there's no way around to read and understand the code contained in
> > the script...
> >
> > To debug, add this line in the script (as the second line, right after
> > the hashbang):
> >
> > set -x
> >
> > Then set "LogLevel debug" in your cupsd.conf.
> >
> > You'll now have more messages in /var/log/cups/error_log. One of these
> > might give you a hint about what went wrong.
> >
> > Maybe the directory the backend is supposed to write into is not
> > existing? Maybe it is not allowed to write into it? Then adjust its
> > Unix file permissions accordingly.
> >
> > > Description: virtual printer to test KDEPrint
> > > Location: on my harddisk, each job saved under a uniq name
> > > Producent: Generic 25C-1 PS
> > > Printer state: stopped, accepting jobs, published
> > > URI: 2dir:/tmp/vprint
> > >
> > > I can click on button "Start printer" on cups admin web page but I am
> > > getting the same error message?
> > >
> > > The idea proposed by you is great and should probably help in my case.
> > > On windows I am printing directly to printer using native driver, so
> > > maybe my ppd driver sets wrong job header.
> >
> > And native Windows driver is...? PostScript?
> >
> >
> > --
> > Kurt Pfeifle
> > System & Network Printing Consultant ---- Linux/Unix/Windows/Samba/CUPS
> > Infotec Deutschland GmbH  .....................  Hedelfinger Strasse 58
> > A RICOH Company  ...........................  D-70327 Stuttgart/Germany
>
> I have found (following your suggestions) that ps files generated via windows driver is different from that generated using ppd file.
>
> Windows ps file header:
> %-12345X at PJL JOB
> @PJL SET STRINGCODESET = UTF8
> @PJL SET JOBNAME = "1000000094_Pl.pdf"
> @PJL SET USERNAME = "Kuba"
> @PJL SET KMCOE = 72
> @PJL SET HOLD = OFF
> @PJL SET DRIVERJOBID = "0002442DFFB6090A0B24280152"
> @PJL SET QTY = 1
> @PJL ENTER LANGUAGE=POSTSCRIPT
> %!PS-Adobe-3.0
> %%Title: 1000000094_Pl.pdf
> %%Creator: PScript5.dll Version 5.2
> %%CreationDate: 9/10/2007 11:36:40
> %%For: Kuba
> %%BoundingBox: (atend)
> %%DocumentNeededResources: (atend)
> %%DocumentSuppliedResources: (atend)
> %%DocumentData: Clean7Bit
> %%TargetDevice: (25C-1/25C-1P) (3011.045) 1
> %%LanguageLevel: 3
> %%EndComments
>
> Linux ps file header:
> %!PS-Adobe-3.0
> %Producer: xpdf/pdftops 3.01
> %%Creator: BIOMOL-MED Sp. z o.o.
> %%Title: Wynik analizy wlosow
> %%LanguageLevel: 2
> %%DocumentSuppliedResources: (atend)
> %%DocumentMedia: plain 595 842 0 () ()
> %%For: (root)
> %RBINumCopies: 1
> %%Pages: (atend)
> %%BoundingBox: (atend)
> %%EndComments
> %%BeginDefaults
> %%PageMedia: plain
> %%EndDefaults
>
> So as you there isn't PJL header in linux file at all. It is also strange that this title "Wynik analizy wlosow" is some part of the the text, somewhere in this document. This name appears in printer log for about 2 seconds and then it disappears. I have read that it is possible to print via pipe to any command, so maybe it is possible to write a script which would add PJB header to ps file, or maybe it is a problem of differences in ps levels between win and Linux.
>
> Thank you very much for Your support
> Kuba

Well it seems that it is working!!! When I add PJL header the job title  in printer log is correct!! I have to write a script which will take job name as a parameter, add pjl header and than forward job to a printer. Printing to a pipe would be the best solution?

Big thanks
Kuba




More information about the cups mailing list