Printing ps with gs?

Printing ps with gs?

Post by Frank Raci » Fri, 09 Jun 1995 04:00:00





Quote:

>I'm tryint to print ps with ghost script and having no luck.
>Here is what I put on the command line and the response it
>gives me.  Following that are my list of installed drivers
>then an excerpt from my /etc/printcap file.  I would appreciate
>any help.

>tabu:/usr/lib/ghostscript/examples# gs -dNOPAUSE -sDEVICE=ljet2p
>-sOutputFile=/dev/lp0 tiger.ps

>Error: /invalidfileaccess in --.outputpage--

You're trying to print directly to the printer port.  This completely
bypasses lpr, which probably isn't what you want.  To get it to
spool through lpr, use -sOutputFile=\|lpr  (the three characters in
the middle should be equals, backslash, vertical line (pipe), in case
my newsposter sent them in EBCDIC).  Check out the gs man page for
other options.

-FwR

 
 
 

Printing ps with gs?

Post by Stepp » Fri, 09 Jun 1995 04:00:00


I'm tryint to print ps with ghost script and having no luck.  
Here is what I put on the command line and the response it
gives me.  Following that are my list of installed drivers
then an excerpt from my /etc/printcap file.  I would appreciate
any help.

tabu:/usr/lib/ghostscript/examples# gs -dNOPAUSE -sDEVICE=ljet2p
-sOutputFile=/dev/lp0 tiger.ps

Initializing... done.
Ghostscript 2.6.1 (5/28/93)
Copyright (C) 1990-1993 Aladdin Enterprises, Menlo Park, CA.
  All rights reserved.
Ghostscript comes with NO WARRANTY: see the file COPYING for details.
Error: /invalidfileaccess in --.outputpage--
Operand stack:
    1  true
Execution stack:
    %interp_exit  --nostringval--  --nostringval--  --nostringval--
    false --nostringval--  --nostringval--  false  --nostringval--  
    --nostringval--  --nostringval--  --nostringval--
Dictionary stack:
    532/547  0/20  6/200  45/100
Current file position is 78508

_________________________________________________________________________
          List of Drivers Installed according to "gs -h"

    x11 linux bj10e bj200 cdeskjet cdjcolor cdjmono cdj500
    cdj550 declj250 deskjet dfaxhigh dfaxlow djet500 djet500c epson
    eps9high epsonc escp2 ibmpro jetp3852 laserjet la50 la75
    lbp8 ln03 lj250 ljet2p ljet3 ljet4 ljetplus m8510
    necp6 paintjet pj pjxl pjxl300 t4693d2 t4693d4 t4693d8
    tek4696 bit bmpmono bmp16 bmp256 bmp16m gifmono gif8
    pcxmono pcxgray pcx16 pcx256 pbm pbmraw pgm pgmraw
    ppm ppmraw tiffg3 pbm pbmraw pgm pgmraw ppm
    ppmraw bit

__________________________________________________________________________
            From my /etc/printcap file (I just used the hpjlp
            settings because it was already in printcap and
            ljet2p was not).

# HP Laser jet plus
#lp|hpj:\
#        :lp=/dev/lp1:\
#        :sd=/usr/spool/lp1:\
#        :mx#0:\
#        :of=/usr/spool/lp1/hpjlp:
#        :lf=/usr/spool/lp1/hp-log:
#
# HP Laser IIp
 lp|hpj:\
         :lp=/dev/lp0:\
         :sd=/usr/spool/lp0:\
         :mx#0:\
         :of=/usr/spool/lp0/ljet2p:

________________________________________________________________________

Thanks for any help!!




 
 
 

Printing ps with gs?

Post by Jianbin » Sat, 10 Jun 1995 04:00:00


I used the command "gs -dNOPAUSE -sDEVICE=ljet2p -sOutputFile=/dev/lp1
file.ps" or -sOutputFile=\|lpr, etc, but always got the following message:

Initializing... done.
Ghostscript 2.6.2 (4/19/95)
Copyright (C) 1990-1995 Aladdin Enterprises, Menlo Park, CA.
  All rights reserved.
Ghostscript comes with NO WARRANTY: see the file COPYING for details.
Loading Bookman-Light font from /usr/lib/ghostscript/fonts/pbkl.gsf...
219192 206742 1 done.
Loading Courier font from /usr/lib/ghostscript/fonts/ncrr.gsf... 279192
269628 1 done.
Loading Palatino-Roman font from /usr/lib/ghostscript/fonts/pplr.gsf...
319192 311496 1 done.
Loading NewCenturySchlbk-Roman font from
/usr/lib/ghostscript/fonts/pncr.gsf... 379192 362795 1 done.
Loading Helvetica font from /usr/lib/ghostscript/fonts/phvr.gsf... 419192
409077 1 done.
GS>

It ended up in the "GS>" prompt, and nothing was sent to the printer.
However, "lpr plain.txt" worked just fine.  My /etc/printcap file is:

# Generic printer:
lp:lp=/dev/lp1:sd=/usr/spool/lp1:sh

Does anyone know what gose wrong?  Thanks in advance.

 
 
 

Printing ps with gs?

Post by Frank Raci » Sat, 10 Jun 1995 04:00:00



says:

Quote:

>I used the command "gs -dNOPAUSE -sDEVICE=ljet2p -sOutputFile=/dev/lp1
>file.ps" or -sOutputFile=\|lpr, etc, but always got the following message:
> ... snip ...

>It ended up in the "GS>" prompt, and nothing was sent to the printer.
>However, "lpr plain.txt" worked just fine.

>Does anyone know what gose wrong?  Thanks in advance.

When you give GS files on the command line, the standard behavior
is that it returns to the prompt and waits for you to enter a D
(end of file) or the "quit" command.

There are 2 options for hands-off printing.  You can make the file
quit.ps (contains the word "quit" and nothing else) and always use
quit.ps as the last thing on the line:
  gs -dNOPAUSE -q -sOutputFile=\|lpr -sDEVICE=ljet2p myfile.ps quit.ps

The other option is to feed it from a pipe:
  cat myfile.ps | gs -dNOPAUSE -q -sOutputFile=\|lpr -sDEVICE=ljet2p -

This will automatically quit (and print) at the end of the file.

-FwR

 
 
 

Printing ps with gs?

Post by Gary Whitt » Sat, 10 Jun 1995 04:00:00


   Path: news.clark.net!europa.chnt.gtegsc.com!news.mathworks.com!news.ultranet.com!news.sprintlink.net!howland.reston.ans.net!news.cac.psu.edu!psuvm!fwr100
   Organization: Penn State University
   Date: Thu, 8 Jun 1995 15:28:51 EDT

   Newsgroups: comp.os.linux.setup

   Lines: 21



   >
   >I'm tryint to print ps with ghost script and having no luck.
   >Here is what I put on the command line and the response it
   >gives me.  Following that are my list of installed drivers
   >then an excerpt from my /etc/printcap file.  I would appreciate
   >any help.
   >
   >tabu:/usr/lib/ghostscript/examples# gs -dNOPAUSE -sDEVICE=ljet2p
   >-sOutputFile=/dev/lp0 tiger.ps
   >
   >Error: /invalidfileaccess in --.outputpage--

   You're trying to print directly to the printer port.  This completely
   bypasses lpr, which probably isn't what you want.  To get it to
   spool through lpr, use -sOutputFile=\|lpr  (the three characters in
   the middle should be equals, backslash, vertical line (pipe), in case
   my newsposter sent them in EBCDIC).  Check out the gs man page for
   other options.

   -FwR

****************************************************************************
You may be using the wrong printer device number. I've setup
postscript printing with gs on two Linux machines and I used:

        -sOutputFile=/dev/lp1

NOT -sOutputFile=/dev/lp0 , which I tried but it did not work.

You might also have to finish off the process with "quit", depending
on the specifics of your printer driver.

        Good luck,
                Gary Whitten

 
 
 

1. Print .ps with gs to bj200 on slackware 3

Hi,

I have just upgrade to Slackware 3.0.0. I try to print
a postscript using gs in the package to my Canon bj200
using the command:

gs -sDEVICE=bj200 -sPAPERSIZE=a4 -sOutputFile=%d.prn \
    -dNOPAUSE xxx.ps

gs output %d.prn for each paper. Then I send it to bj200
using lpr. My printer gives me the garbage! Well, I have
no problem when I still using Slackware 2.2.

Do you have same problem? Wanted help! Thanks in advance!

--

Please feel free to contact me if you have any problem.

Regards
--
       Name : Tse Fu Wing                    *    

         W3 : http://www.ee.cuhk.hk/~fwtse/  * Slackware 3.0.0(ELF)
Affiliation : Department of Electronic       * Linux Kernel 1.2.13(ELF)
              Engineering, The Chinese       * XFree86 3.1.2(ELF)
              University of Hong Kong        *
     Office : Room 304, HSH Engineering      *
              Building                       *
        Tel : (852)-26098253                 *      
        Fax : (852)-26035558                 *  

2. How to use the "Install from File system" or "Install from Dos Partition"

3. Printing PS with GS?

4. rlogin + NAT = Connection from x.x.x.x on illegal port

5. want ps file that prints ps file then exits gs

6. Help: sun volume manager steals 20GB

7. Printing PS file directly to BJ10e with gs...

8. cannot talk with modem

9. PS print queue with GS on RS6000

10. How do I print PS with non-PS printer ?

11. How to print PS file in a non-PS printer?

12. How to print a ps file to a non-ps printer thru gs241?

13. ps-printing [was Re: ASCII 2 PS Formatter??]