Alexww
Alexww

Reputation: 1

How to bypass media selection command to printer when using Ghostscript rip ps files?

I am trying to use GhostScript to rip PostScript files first on computer and then forward them to a ricoh MP1350 printer through USB connection, but failed. So I hereby ask for help. The detail is as following.

Followed the instructions provided on www.stat.tamu.edu/~henrik/GSPSPrinter/GSPSprinter.html, I succeeded in building a virtual PS printer on a PC with Win7.

I setup the virtual PS printer with MP1350 PS driver, creating the redirect port RPT1 with argument told by the instruction and in help with RedMon, all printing data were forwarded to the real MP1350 device connected with the PC through USB.

It DOES work when dealing with common printing jobs. However, when I send PostScript files containing MP1350's media selection commands, it seems fail to tell the printer to fetch paper in tray 2 or 3 or 4 as told in that PS file. All pieces of paper are fetched in tray 1.

The print command is:

copy /b sample.ps \\127.0.0.1\gspspr

in which "gspspr" is the printer name of the virtual PS printer, with MP1350 PS driver Ver3.1(latest) installed. "sample.ps" is the postscript file I mentioned above.

The arguments file "mswinpr2.txt" is written as follow:

-Ic:\gs\gs9.05\lib
    -sDEVICE=mswinpr2
    -dNoCancel
    -dNOPAUSE
    -dSAFER
    -dMaxBitmap=400000000
    -dBufferSpace=400000000
    -dNumRenderingThreads=2
    -dMaxPatternBitmap=80000000
    -sPAPERSIZE=a4

With the same PostScript file "sample.ps", if I send it using this command:

copy /b sample.ps \\127.0.0.1\gsprinter

in which "gsprinter" is the name of real MP1350 connected through USB, with MP1350 PS driver Ver3.1(latest) installed. The printer MP1350 can tell those media selection commands and fetch paper from tray 2 or 3 or 4 as told.

All the driver settings of these two devices are the same, and I set output protocol to "TBCP" in "Device Settings" tab.

So please help me to tell, why the printer fails to select the certain media trays when I use gs to rip that ps file? And how to solve it?

With great appreciation!

Upvotes: 0

Views: 2669

Answers (2)

Not Here
Not Here

Reputation: 1

If your printer understands PCL5 or PCL6, you can rip your files through ghostscript and have ghostscript mapping the postscript MediaPosition to trays in HP-like printers. Two of the ghostscript drivers - ljet4 (or one of the pcl5? ones) and pxlcolor, can map postscript mediaposition to HP media trays. See also discussion on the InputAttributes dictionary and the -dNOMEDIAATRS switch, however. http://bugs.ghostscript.com/show_bug.cgi?id=693053

Upvotes: 0

KenS
KenS

Reputation: 31199

The PostScript file contains the media and tray selection command,s if you send the PostScript to the printer directly, then those commands are acted upon by the printer.

When you use Ghostscript, you are actually rendering the PostScript to a bitmap, which the mswinpr2 device forwards to the windows printing system. The final printer can be anything, it need not be a PostScript printer. However you can't embed tray selection commands in the bitmap, so there is no way to preserve that request form the original job.

There is no way to 'solve' this, its in the nature of the process.

Given that your printer clearly accepts PostScript directly why are you even using Ghostscript at all ?

Upvotes: 1

Related Questions