[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#781253: cups: no duplex printing (two-sided) with lp or lpr



Control: reopen -1
Control: retitle -1 no duplex printing (two-sided) with lp or lpr of a letter PDF file on A4 paper

Sorry for the late reply. In the mean time, I talked to the sysadmin
and we did more tests. I'm reopening the bug since I have more
information that could be useful to get a client-based solution
(just like what evince does). I also have an option that works,
but undocumented.

The printer has A3 and A4 paper. With lp and lpr, A4 PDF files are
printed in duplex mode as expected. The problem actually occurs
with files having the "letter" page size. For such files (such as
the one attached as an example), lp and lpr print them on A4 paper
but one-sided; and xpdf using the lpr command (with no options)
prints them two-sided, but on A3 paper. For xpdf, I had reported
the bug:

  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=781251

but I now wonder whether this is related and whether there may be a
server problem too. Same problem if I convert the PDF file to PS with
pdftops, then print the .ps file with lp: A3 paper, two-sided.

On 2015-03-30 14:03:23 +0100, Brian Potkin wrote:
> On Mon 30 Mar 2015 at 11:30:26 +0200, Vincent Lefevre wrote:
> 
> > On 2015-03-27 19:12:13 +0000, Brian Potkin wrote:
> > > 
> > > With a print queue set up for the Ricoh MP C3003 PS on a Wheezy machine
> > > (cups 1.5.3-5+deb7u4) and printing from Evince on an up-to-date Jessie
> > > machine using client.conf we get this for argv[5]:
> > > 
> > >   "InputSlot=1Tray RPSRGBcorrect=DetailBright RPSDitherType=Auto
> > >   RIwmSize=36 RIBannerPageMediaType=Auto LockedPrintPassword=None
> > >   RIWMText=Confidential Rcmyksimulation=Off RIwmAngle=45Deg
> > >   Booklet=None RPSColorRendDict=Auto RIPaperPolicy=PromptUser
> > >   RPSBlackMode=gray noRPSColorUniversalDesign PageSize=A4
> > >   JobType=Normal noRIBannerPagePrint RIPrintMode=0rhit
> > >   MediaType=Auto RIRotateBy180=Off RIwmTextStyle=Gray
> > >   RIBannerPageInputSlot=Auto ColorModel=CMYK Rimagesm=Off
> > >   number-up=1 noRPSBlackOverPrint RIOrientOvr=Off
> > >   Resolution=600dpi RPSColorSep=None DocServerPassword=None
> > >   UserCode=None Duplex=DuplexNoTumble RIwmFont=HelveticaB
> > >   RIWatermark=Off OutputBin=Default RPSBitsPerPixel=1BitsPerPixel
> > >   job-uuid=urn:uuid:56b63b42-349d-3379-4399-f9ae15d99b13
> > >   job-originating-host-name=192.168.7.212 time-at-creation=1427480204
> > >   time-at-processing=1427480204"
> > > 
> > > For 'lp -p test -o sides=two-sided-long-edge file.pdf' it is:
> > > 
> > >   "finishings=3 number-up=1 sides=two-sided-long-edge
> > >   job-uuid=urn:uuid:a9eacec3-3b00-30c4-799f-677abbbdb0d3
> > >   job-originating-host-name=192.168.7.212
> > >   time-at-creation=1427480636 time-at-processing=1427480636
> > >   Duplex=DuplexNoTumble"

If I use

  lp -o InputSlot=1Tray -o RPSRGBcorrect=DetailBright -o RPSDitherType=Auto -o RIwmSize=36 -o RIBannerPageMediaType=Auto -o LockedPrintPassword=None -o RIWMText=Confidential -o Rcmyksimulation=Off -o RIwmAngle=45Deg -o Booklet=None -o RPSColorRendDict=Auto -o RIPaperPolicy=PromptUser -o RPSBlackMode=gray -o noRPSColorUniversalDesign -o PageSize=A4 -o JobType=Normal -o noRIBannerPagePrint -o RIPrintMode=0rhit -o MediaType=Auto -o RIRotateBy180=Off -o RIwmTextStyle=Gray -o RIBannerPageInputSlot=Auto -o ColorModel=CMYK -o Rimagesm=Off -o number-up=1 -o noRPSBlackOverPrint -o RIOrientOvr=Off -o Resolution=600dpi -o RPSColorSep=None -o DocServerPassword=None -o UserCode=None -o Duplex=DuplexNoTumble -o RIwmFont=HelveticaB -o RIWatermark=Off -o OutputBin=Default -o RPSBitsPerPixel=1BitsPerPixel babel-bib.pdf

or "-o media=a4", I still get one-sided printing. So, it seems that
these options do not matter, or different ones are used on my machine
(but I don't know which ones).

I've googled a bit, and found a solution given here:

  http://www.unix.com/302870967-post7.html

Here, "lp -o fitplot -o pdf-page=A4 babel-bib.pdf" prints on A4 paper,
two-sided. However:

  * These options are undocumented. I don't know what they are
    supposed to do and how they have been found.

  * I wonder whether lp could do the right thing automatically.

> > > In both cases the client has sent the PDF and the correct options. At
> > > this stage cups-client appears to have done its job correctly.
> > 
> > Is there a way to know that it is also the case on my machine
> > with the client.conf I'm using?
> 
> As root here:
> 
>    ngrep port 631 > cupsfile

Unfortunately I have to use 443, and this is encrypted.

> > > The versions for cups and foomatic related packages would be
> > > useful to know.
> > 
> > The versions on the print server?
> 
> Yes. The processing of the job takes place there.

The server is a standard Debian/wheezy machine, with:
  foomatic-db 20120523-1
  foomatic-db-engine 4.0.8-3
  foomatic-filters 4.0.17-1
  cups 1.5.3-5+deb7u5

On 2015-04-19 20:13:32 +0100, Brian Potkin wrote:
> On Wed 01 Apr 2015 at 15:01:14 +0100, Brian Potkin wrote:
> > /usr/share/doc/shared-mime-info/shared-mime-info-spec.pdf should be on
> > your system. Pages 18 and 19 of it were printed here.
> > 
> > I captured the PostScript file produced on the Wheezy server when sent
> > from Evince on the Jessie client. It is attached as c3003-evince.
> > 
> > Then 'lp -d test -o two-sided-long-edge -o page-ranges=18-19' for the
> > same PDF. The captured PostScript file is c3003-lp.
> > 
> > Both the attached files print as duplex when sent to my PS printer with
> > 'lp -d LaserJet-300 -o raw'.

This c3003-lp file is printed correctly here: A4 paper, two-sided.

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

Attachment: babel-bib.pdf
Description: Adobe PDF document


Reply to: