Question

I using the command :

 -q -dBATCH -dNOPAUSE -dNODISPLAY -dPDFFitPage \
 -c  "mark /BitsPerPixel  1  \
           /NoCancel true \
           /NumCopies 2 \
           /Duplex true \
           /OutputFile (%printer%Ricoh c2051)  \
           /UserSettings << /DocumentName  (Arquivo Teste) \
                            /MaxResolution 500  >>  \
      (mswinpr2)finddevice putdeviceprops setdevice"   -f  "C:\Test123.pdf" 

The PDF file have 3 pages, when I set the NumCopies 2 for example, the result is 3 pages :

  • page 1 = the text of page one, in both sides;
  • page 2 = the text of page two, in both sides;
  • page 3 = the text of page three, in both sides;

But when I set just one copy the result is 2 pages:

  • page 1 : the text of page one and in the other side the text of page 2
  • page 2 : the text of page three and the other side blank .

like Duplex are supposed to be.

Anyone knows how this happened ?

Was it helpful?

Solution

Its a consequence of the way mswinpr2 works, it doesn't care about you setting /Duplex true because the device is not a duplexing device (your printer obviously is, but that's not the same thing). In fact the majority of the command line will have no effect on teh output.

When you set NumCopies, it prints each page 'NumCopies' times to the printer so if your printer is set to do duplexing then it prints the first copy of page 1 on the first side, then the second copy of page 1 on the second side (ie the back of page 1) then the first copy of page 2 on the third side (the front of page 2) and so on.

You cannot achieve multiple collated copies using the mswinpr2 device.

The command line you have set suggests that you have the PostScript option for your printer, you could instead use the ps2write device to convert the PDF to PostScript and send the PostScript to the printer, the latest version of Ghostscript allows for the injection of device-specific options into the output PostScript so you could easily add NumCopies and Duplex there, assuming your printer has sufficient memory to do duplexing and NumCopies at the same time.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top