I want to print a Postscript file. I read in the Ghostscript documentation that I can use the command:
gs -sDEVICE=*devicename* myfile.ps
But what is my devicename?
In the manual, it says that I can check the available devices with “devicenames ==”. This gives a long list of names, none of which I recognise as my local device.
Additional, if I use ghostview to view myfile.ps, I can successfully print it by selecting that option from the menu. The strange thing is that whatever I put in the printer name field (or even leave blank as it is not pre-populated with a drop-down list), it prints to my local printer.
How does GhostView know what/where/which printer I have? What is the mapping/aliasing between Ghostscript and my local postscript printer?
Using openSUSE 11.3 and CUPS, I can run the following program and find the names of my printer queues. (Alt-F2 and paste the following command)
desktop-launch http://localhost:631/
Select the **Administration Tab **Then select Manage Printers button and I see the queue names for all installed printers. This launches Firefox, but you can just press the following link http://localhost:631/ if you want while running Firefox.
I guess that fact that it was printing without a “named” device was due to the fact that I had defined the postscript printer as my default?
I think that depends on what application you are trying to print from. Using terminal commands to print is less user friendly than printing from some GUI. So, what was the name of your printer?
> Now, using lp -d phaser myfile.ps is just fine.
> But not for Ghostscript? The command gs -sDEVICE=phaser myfile.ps
> give me “unknown device”?
I have never printed from ghostscript, so I don’t know. However, cups may
use ghostscript as a filter during the print processing.
Have you read the man page? The device is the “driver”, like “epson” for a
9 pin printer. And the output goes to the screen by default, not to the
real printer.
> Ghostscript may be built to use many different output devices. To see which devices your executable includes, run
> “gs -h”. Unless you specify a particular device, Ghostscript normally opens the first one of those and directs out-
> put to it, so if the first one in the list is the one you want to use, just issue the command