[comp.lang.postscript] HP111 postscript file io

jeffe@eniac.seas.upenn.edu (George Jefferson ) (11/06/90)

I have an HP111 with the HP ps cartridge connected
to a PC via a serial connection.

according to the red book I should be able to
open a file and write to it like this:

(filename) (w) file (string) writestring

however this produces a 'file not found' error 
(pserror 19 on the printer display)

I seems like I need to get the filename syntax correct,
i have been trying things like c:\\file, \\file, \file,
etc, etc with no luck.

I have discovered that

(%stderr) (w) file (string) writestring 

does not produce an error, but also does not produce a file 
(that I can find.. I know a bit more about 
Postscript than DOS )






--
-george   @sol1.lrsm.upenn.edu

jlister@slhisc.uucp (John Lister) (11/07/90)

There are various different PostScript printers in existence, some of which
have hard disks (to store fonts and other things on). The file operators in
PostScript enable you to access the hard disks attached to the PRINTER.

The HP Laserjet (any model) is not one of those printers.  Therefore, I'm
not surprised that trying the hard disk operators gives you an error.

What exactly were you trying to achieve?

John Lister.

jeffe@eniac.seas.upenn.edu (George Jefferson ) (11/08/90)

>There are various different PostScript printers in existence, some of which
>have hard disks (to store fonts and other things on). The file operators in
>PostScript enable you to access the hard disks attached to the PRINTER.

ok, thanks to numerous replies I now understand that the
only valid file write operation for a printer with no
attached file system is to %stdout.  Unfortunately my PC
doesn't recoginse the incoming data.

>
>What exactly were you trying to achieve?

I want remote notification of printer status (like I get
from a laserwriter connected to a unix system).

I guessed that since the HP has a (very nice) built in status
display that it may not automatically spit out an error/log file.
(this still could be the case - anybody know for sure?)

I thought I could force output with a writestring operation.
I guess I wont know if this works until I get the HP connected
to a friendlier host.

-thanks for all your help.
-george

--
-george   @sol1.lrsm.upenn.edu

glenn@heaven.woodside.ca.us (Glenn Reid) (11/08/90)

In article <32311@netnews.upenn.edu> jeffe@eniac.seas.upenn.edu (George Jefferson ) writes:
>I have an HP111 with the HP ps cartridge connected
>to a PC via a serial connection.
>
>according to the red book I should be able to
>open a file and write to it like this:
>
>(filename) (w) file (string) writestring

The file operators in PostScript work only with file systems that
are directly available to the PostScript interpreter.  If your
printer had a hard disk attached to it, you could open arbitrary
files.  In your setup, there is no way for the PostScript
interpreter to "climb back up" the serial connection to access
the file system on your host computer (the PC).

In Display PostScript environments, the interpreter actually runs
on the host computer, and has access to the file system.

Unfortunately, you're out of luck in your situation.

-- 
 Glenn Reid				RightBrain Software
 glenn@heaven.woodside.ca.us		PostScript/NeXT developers
 ..{adobe,next}!heaven!glenn		415-851-1785