Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

print postscript file from command line in window

0 views
Skip to first unread message

Wai Shun Au

unread,
Jul 12, 2001, 4:47:09 PM7/12/01
to
in unix, i can call lp <filename>.ps to send a postscript file to the
printer. is there a equivalent command
in window that i can send a postscript file to printer from the dos prompt?
without installing ghostview?

Henry Churchyard

unread,
Jul 12, 2001, 5:02:53 PM7/12/01
to
In article <f1o37.96$ym4....@iad-read.news.verio.net>,

In the old DOS days, COPY FILENAME.PS PRN (or LPT1 or whatever) would
work, and there was even a TSR print spooler that came standard with
DOS, but I'm not really sure how all this works within a DOS box under
Windows...


--%!PS
10 10 scale/M{rmoveto}def/R{rlineto}def 12 45 moveto 0 5 R 4 -1 M 5.5 0 R
currentpoint 3 sub 3 90 0 arcn 0 -6 R 7.54 10.28 M 2.7067 -9.28 R -5.6333
2 setlinewidth 0 R 9.8867 8 M 7 0 R 0 -9 R -6 4 M 0 -4 R stroke showpage
% Henry Churchyard chu...@usa.net http://www.crossmyt.com/hc/

Aandi Inston

unread,
Jul 12, 2001, 5:00:24 PM7/12/01
to
"Wai Shun Au" <wsh...@integ.com> wrote:

Sure, provided it's a PostScript printer.

COPY /B filename LPT1:

for example.
----------------------------------------
Aandi Inston qu...@dial.pipex.com
Visit http://www.quite.com/ for info on PostScript,
PSAlter, psalters, tea, and small furry animals. And stuff.

Benjamin Riefenstahl

unread,
Jul 12, 2001, 5:10:55 PM7/12/01
to

If the printer can do PostScript the PRINT command will do. Try
PRINT/? at the prompt to get a short summary.

Dan Sideen

unread,
Jul 12, 2001, 6:39:38 PM7/12/01
to
If your printers is a network printer, it is a little tricker. In NT or
Winxx networks, you will probably need to use the NET USE command to asign
the network device name to the printer port:

NET USE \\machinename\printername lpt1

And the printer must be shared.

"Aandi Inston" <qu...@dial.pipex.com> wrote in message
news:3b4e0fd6....@reading.news.pipex.net...

Russell Lang

unread,
Jul 13, 2001, 2:57:27 AM7/13/01
to
"Henry Churchyard" <chu...@usa.net> wrote in message
news:9il39t$o...@moe.cc.utexas.edu...

> In article <f1o37.96$ym4....@iad-read.news.verio.net>,
> Wai Shun Au <wsh...@integ.com> wrote:
>
> > in unix, i can call lp <filename>.ps to send a postscript file to
> > the printer. is there a equivalent command in window that i can
> > send a postscript file to printer from the dos prompt? without
> > installing ghostview?
>
> In the old DOS days, COPY FILENAME.PS PRN (or LPT1 or whatever) would
> work, and there was even a TSR print spooler that came standard with
> DOS, but I'm not really sure how all this works within a DOS box under
> Windows...

Make sure you add the /B
copy /b filename.ps \\server\printer_queue_name

RedPr.exe distributed with RedMon allows you to use the
queue name on the local computer. To get the list of printer
queues:
redpr
To print a file
redpr -P"my printer queue name" file.ps
http://www.cs.wisc.edu/~ghost/redmon/


Michael Hemmer

unread,
Jul 13, 2001, 4:17:39 AM7/13/01
to
Original message:

You may want to try the freeware program PrintFile, available in version
2.1.4 from its homepage http://hem.passagen.se/ptlerup/prfile.html (and in
many other places, of course).

The DOS commands "PRINT ..." and "COPY /B ... PRN" require an LPT port to
send the file to. For non-local printers, you need to establish a fake LPT
port. For Windows "Network" printers, this can be achieved in several ways,
the simplest of which is probably via the context menu in "Network
Neighborhood". Unfortunately, there doesn't seem to be a way to address
"Other" Windows printers (including TCP/IP network printers) as LPT ports.

In PrintFile "Settings", you can chose _any_ available printer just as you
do in other Windows applications. Anyway, you must make sure that "Show
printer selection dialog" is deactivated, otherwise printing from the
command line will not work the way you want it to. Now you can print from
the command prompt or from a batch file using "whatever_path\prfile32.exe
anyfile.ps". (If you don't like the PrintFile window to appear, you may
optionally include "/q" on the command line.) For a full description
including many advanced features (like n-up printing) see the help file.

Michael Hemmer

0 new messages