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

ghostscript printing error

43 views
Skip to first unread message

Pierre Jelenc

unread,
Apr 23, 2009, 3:06:13 PM4/23/09
to
Ghostscript gives me the following error message when I try to print to my
Laserjet on LPT1.

GPL Ghostscript 8.64: **** Could not open the file \\spool\HPLaser1 .
Page 1

What is "\\spool\HPLaser1" and why should it be opened? The only mention
of spools I can find is the SPOOL command to redirect output, but I can't
see how this would apply here since there's no redirection.

Although I don't use GS/GView that often, I've always been able to print
in the past, with the same setup (running eCS 1.2). Printing works fine
from other text or graphics programs.

Thanks,

Pierre
--
Pierre Jelenc
The Gigometer www.gigometer.com
The NYC Beer Guide www.nycbeer.org

Peter Brown

unread,
Apr 23, 2009, 4:43:28 PM4/23/09
to
Hi Pierre

Pierre Jelenc wrote:
> Ghostscript gives me the following error message when I try to print to my
> Laserjet on LPT1.
>
> GPL Ghostscript 8.64: **** Could not open the file \\spool\HPLaser1 .
> Page 1
>
> What is "\\spool\HPLaser1" and why should it be opened? The only mention
> of spools I can find is the SPOOL command to redirect output, but I can't
> see how this would apply here since there's no redirection.
>
> Although I don't use GS/GView that often, I've always been able to print
> in the past, with the same setup (running eCS 1.2). Printing works fine
> from other text or graphics programs.
>
> Thanks,
>
> Pierre


I would guess that your printer spools to \var\spool\HPLaser1

If I'm right then gs is looking for the spool file in the wrong location
but, Sorry, no idea on how to configure gs.

Regards

Pete

Pierre Jelenc

unread,
Apr 23, 2009, 8:00:57 PM4/23/09
to
Peter Brown <losepeteS...@ntlworld.com> writes:
>
> I would guess that your printer spools to \var\spool\HPLaser1

Spooling was disabled (no idea why...) so I re-enabled it, but it makes no
difference, the error message is the same.

I then tried adding it explicitly to the command line parameters as
described in the docs:
For printer devices, output goes to the default queue. To print to
a specified queue, use -sOutputFile=\\spool\NullLPT1, where
NullLPT1 is the queue's physical name.

so I added -sOutputFile=f:\spool\HPLaser1
which is a real directory, fully writable and with plenty of space. Still,
I get an error, although a bit different one:

GPL Ghostscript 8.64: **** Could not open the file f:\spool\HPLaser1
GPL Ghostscript 8.64: **** Could not open the file f:\spool\HPLaser1
**** Unable to open the initial device, quitting.
gsapi_exit returns 0
DosFreeModule returns 12

Where it says "file" I wonder whether it literally means a data file, or
if it's a leftover from Unix and it really means "directory". I must say I
do not understand how spooling works.

Chuck McKinnis

unread,
Apr 24, 2009, 11:11:07 PM4/24/09
to
On Thu, 23 Apr 2009 19:06:13 UTC, rc...@panix.com (Pierre Jelenc)
wrote:

> Ghostscript gives me the following error message when I try to print to my
> Laserjet on LPT1.
>
> GPL Ghostscript 8.64: **** Could not open the file \\spool\HPLaser1 .
> Page 1
>
> What is "\\spool\HPLaser1" and why should it be opened? The only mention
> of spools I can find is the SPOOL command to redirect output, but I can't
> see how this would apply here since there's no redirection.
>
> Although I don't use GS/GView that often, I've always been able to print
> in the past, with the same setup (running eCS 1.2). Printing works fine
> from other text or graphics programs.
>
> Thanks,
>
> Pierre

I just updated to 8.64. Check your include parms carefully against
the ones Paul mentioned in the readme.os2 file. Check your printer
setting. I just printed one of the sample files to my Lexmark E260dn
without any problem.

--
Chuck McKinnis

Pierre Jelenc

unread,
Apr 25, 2009, 3:14:08 AM4/25/09
to

I had one font statement missing (the resource\font one), but that made
no difference at all. Anyway, this is a problem with spooling, not
rendering: the text on screen is perfectly fine.

The printer works with everything else, so I'm not sure what it is that
should be checked.

Chuck McKinnis

unread,
Apr 27, 2009, 12:19:42 PM4/27/09
to
On Sat, 25 Apr 2009 07:14:08 UTC, rc...@panix.com (Pierre Jelenc)
wrote:

You might want to check the printer (the physical name as shown on the
properties page) name against the name in ...\spool. If all else
fails, I would delete the printer object and re-install it.

--
Chuck McKinnis

Pierre Jelenc

unread,
Apr 27, 2009, 3:02:19 PM4/27/09
to
Chuck McKinnis <mcki...@sandia.net> writes:
>
> You might want to check the printer (the physical name as shown on the
> properties page) name against the name in ...\spool. If all else
> fails, I would delete the printer object and re-install it.

The printer is named "HP LaserJet 6P/6MP - PostScript" in the printers
folder, and there is a directory named F:\SPOOL\HPLaser1 (and that
directory is referred to several times in OS2.INI, associated with PMView,
Smalled, and PM_Abstract:Objects but no other application.)

If I try to print, I get the error message


GPL Ghostscript 8.64: **** Could not open the file \\spool\HPLaser1


However (and this is something I had not noticed before because I had not
waited long enough) if I don't close GSView but let it go on without
dismissing the error message, the message disappears on its own and
eventually (after several minutes of intense CPU usage) two files appear
in F:\SPOOL\HPLaser1\ named 00010.SHD and 00010.SPL

After a while the printer begins to flash, as though it were receiving
data, the files in F:\SPOOL\HPLaser1 disappear, the flashing stops, and
nothing gets printed!

As a test, I tried printing from PMView: two similar files appear in
F:\SPOOL\HPLaser1, the image gets printed normally and the files
disappear.

Steve

unread,
Apr 28, 2009, 8:21:06 AM4/28/09
to
rc...@panix.com (Pierre Jelenc) writes:
>
>After a while the printer begins to flash, as though it were receiving
>data, the files in F:\SPOOL\HPLaser1 disappear, the flashing stops, and
>nothing gets printed!

Hi,

In my experience thic can result from sending non-PostScript
data, or PostScript data without the HP control language, to an HP
printer. Blinks for a long time, and then quits. Check GSView
printing options, or set the printer to default to PostScript
instead of looking for control language to differentiate print
job types.

HTH,

Steve N.

Chuck McKinnis

unread,
Apr 28, 2009, 10:03:16 AM4/28/09
to
On Mon, 27 Apr 2009 19:02:19 UTC, rc...@panix.com (Pierre Jelenc)
wrote:

> Chuck McKinnis <mcki...@sandia.net> writes:

The physical name (and the spool queue name) is the name shown on the
properties page of the printer, not the name given to the printer
object in the printers folder.

--
Chuck McKinnis

Pierre Jelenc

unread,
Apr 29, 2009, 2:02:36 AM4/29/09
to
Chuck McKinnis <mcki...@sandia.net> writes:
> On Mon, 27 Apr 2009 19:02:19 UTC, rc...@panix.com (Pierre Jelenc)
> wrote:
> >
> > After a while the printer begins to flash, as though it were receiving
> > data, the files in F:\SPOOL\HPLaser1 disappear, the flashing stops, and
> > nothing gets printed!
>
> The physical name (and the spool queue name) is the name shown on the
> properties page of the printer, not the name given to the printer
> object in the printers folder.

Ah, I see. It is called HPLaser1 so it should work... I does not.

Pierre Jelenc

unread,
Apr 29, 2009, 2:14:43 AM4/29/09
to
Steve <Bo...@Embarq.com> writes:
>
> In my experience thic can result from sending non-PostScript
> data, or PostScript data without the HP control language, to an HP
> printer. Blinks for a long time, and then quits. Check GSView
> printing options, or set the printer to default to PostScript
> instead of looking for control language to differentiate print
> job types.

The printer is set for PostScript, only the PS driver is loaded.

I froze the files in F:\SPOOL\HPLaser1 by turning off the printer before
they disappeared. There are two file, 00011.SHD which is a binary file
that starts with hex 80 00 0B 00 32 00 9E 00 B5 1C 00 00 00 00 D8 B4 ...
and is 1,284bytes long. It also contains some text such as:

.............PSC RIPT..PMPRINT.HP Laser1.PM_Q_RAW.
.Ghostscript.... .c.......HP Lase rJet 6P/6MP - PostScript.
....... .............HP LaserJet 6P/6MP - PostScript....
.Lower.FEED.ECT. .Courier...........Letter/Letter............
...PM_DD_HPLaserJ,PS CRIPT.HP LaserJe t 6P/6MP - PostScript..

(some binary stuff removed)

and a file called 00011.SPL which starts like a bona fide PostScript:

%!PS-Adobe-3.0
%%Pages: (atend)
%%BoundingBox: 0 0 973 1251
%%HiResBoundingBox: 0.000000 0.000000 972.960037 1250.040048
%.......................................
%%Creator: GPL Ghostscript 864 (pswrite)
%%CreationDate: 2009/04/29 02:00:39
%%DocumentData: Clean7Bit
%%LanguageLevel: 2
%%EndComments
%%BeginProlog
% This copyright applies to everything between here and the %%EndProlog:
% Copyright (C) 2009 Artifex Software, Inc. All rights reserved.
%%BeginResource: procset GS_pswrite_2_0_1001 1.001 0
/GS_pswrite_2_0_1001 80 dict dup begin
/PageSize 2 array def/setpagesize{ PageSize aload pop 3 index eq exch
4 index eq and{ pop pop pop}{ PageSize dup 1
[...etc]

Both files disappear if I let the attempted printing follow its course.

Ilya Zakharevich

unread,
Apr 29, 2009, 1:25:32 PM4/29/09
to
On 2009-04-29, Pierre Jelenc <rc...@panix.com> wrote:
> %!PS-Adobe-3.0
> %%Pages: (atend)
> %%BoundingBox: 0 0 973 1251
> %%HiResBoundingBox: 0.000000 0.000000 972.960037 1250.040048
> %.......................................
> %%Creator: GPL Ghostscript 864 (pswrite)

Did you try to view this PS file?

Yours,
Ilya

Pierre Jelenc

unread,
Apr 29, 2009, 9:46:54 PM4/29/09
to

It looks like page 1 of the original document.

Steve

unread,
Apr 30, 2009, 8:06:19 AM4/30/09
to
rc...@panix.com (Pierre Jelenc) writes:
..
<snip>

>I froze the files in F:\SPOOL\HPLaser1 by turning off the printer before
>they disappeared. There are two file, 00011.SHD which is a binary file
>that starts with hex 80 00 0B 00 32 00 9E 00 B5 1C 00 00 00 00 D8 B4 ...
>and is 1,284bytes long. It also contains some text such as:
<snip>

>
>and a file called 00011.SPL which starts like a bona fide PostScript:
>
>%!PS-Adobe-3.0
>%%Pages: (atend)
Have you tried copying the PS file to the printer port
(assuming it is on an LPT port)? Bypassing the spooler.

Steve N.

Pierre Jelenc

unread,
Apr 30, 2009, 1:47:24 PM4/30/09
to

Oh, interesting. The file looks OK, starting with

%!PS-Adobe-3.0
%%Pages: (atend)
%%BoundingBox: 0 0 973 1251

and ending with

cleartomark end end pagesave restore
showpage
%%PageTrailer
%%Trailer
%%Pages: 1
%%EOF

When I copy it to LPT1: (10,194,430 bytes) from the command line, the
receiving light flashes, the prompt comes back in about 2 seconds while
the printer continues to flash for 1'40". Then nothing. Forcing print with
CTRL-L produces a blank page, so it's not that it was missing a new-page
command.

Marty

unread,
Apr 30, 2009, 3:03:02 PM4/30/09
to

Did you use the "/B" switch on copy to make sure it's sending the whole
file?

--
[Reverse the parts of the e-mail address to reply.]

Pierre Jelenc

unread,
Apr 30, 2009, 7:22:47 PM4/30/09
to
Marty <n...@comcast.martyamodeo> writes:
>
> Did you use the "/B" switch on copy to make sure it's sending the whole
> file?

Yes. Both with and without /B, exactly the same behavior.

Chuck McKinnis

unread,
May 1, 2009, 12:37:48 AM5/1/09
to
On Wed, 29 Apr 2009 06:02:36 UTC, rc...@panix.com (Pierre Jelenc)
wrote:

> Chuck McKinnis <mcki...@sandia.net> writes:
> > On Mon, 27 Apr 2009 19:02:19 UTC, rc...@panix.com (Pierre Jelenc)
> > wrote:
> > >
> > > After a while the printer begins to flash, as though it were receiving
> > > data, the files in F:\SPOOL\HPLaser1 disappear, the flashing stops, and
> > > nothing gets printed!
> >
> > The physical name (and the spool queue name) is the name shown on the
> > properties page of the printer, not the name given to the printer
> > object in the printers folder.
>
> Ah, I see. It is called HPLaser1 so it should work... I does not.
>
> Pierre

I just tested by installing the same update as you have, selecting a
sample file, and printing it to my Lexmark E260dn (a PS printer).

--
Chuck McKinnis

Steve

unread,
May 1, 2009, 8:31:16 AM5/1/09
to
rc...@panix.com (Pierre Jelenc) writes:

>Steve <Bo...@Embarq.com> writes:
>> Have you tried copying the PS file to the printer port
>> (assuming it is on an LPT port)? Bypassing the spooler.
>
>Oh, interesting. The file looks OK, starting with
>
> %!PS-Adobe-3.0
> %%Pages: (atend)
> %%BoundingBox: 0 0 973 1251
>
>and ending with
>
> cleartomark end end pagesave restore
> showpage
> %%PageTrailer
> %%Trailer
> %%Pages: 1
> %%EOF
>
>When I copy it to LPT1: (10,194,430 bytes) from the command line, the
>receiving light flashes, the prompt comes back in about 2 seconds while
>the printer continues to flash for 1'40". Then nothing. Forcing print with
>CTRL-L produces a blank page, so it's not that it was missing a new-page
>command.

Forcing a page with CTRL-L means the printer is _not_ processing
PostScript code. It is processing text/ASCII/PCL code. CTRL-L is
the ASCII form feed and not a PostScript command. (While the printer
is blinking, you can send a CTRL-D, which _some_ PostScript printers
treat as an EOF. On my HP printer all this does is stop the blinking
when processing PostScript.)

10 megs? Eek! You may be running out of memory. The HP 6MP was
not their high end. But not if produced by a reasonable application.
(Mumble.)

If your printer defaults to PostScript, the following code snippet
will print a page.

- - - Snip! - - -
%! <= first two characters indicate a PostScript file in many circumstances.

72 72 moveto 72 144 lineto 144 144 lineto 144 72 lineto
closepath stroke
showpage % <= this spits out a page.
%%EOF <= optional, printer should not care.
- - - Unsnip! - - -

Copy directly to the printer. Optionally add a CTRL-D?

HTH,

Steve N.

Pierre Jelenc

unread,
May 1, 2009, 5:38:02 PM5/1/09
to
Steve <Bo...@Embarq.com> writes:
>
> Forcing a page with CTRL-L means the printer is _not_ processing
> PostScript code.

I did that after flashing had stopped, just to see what would happen,
precisely in case it had benn processing text. Clearly it had not since
the page ejected was blank.

> 10 megs? Eek! You may be running out of memory. The HP 6MP was
> not their high end. But not if produced by a reasonable application.

Agreed, it sounds awfully large for a 1 page leaflet! Incidentally, the
original test PDF I was using is here:

http://www.centralparknyc.org/site/DocServer/Refreshments_Restrooms.pdf

> If your printer defaults to PostScript, the following code snippet
> will print a page.
>
> - - - Snip! - - -
> %! <= first two characters indicate a PostScript file in many circumstances.
>
> 72 72 moveto 72 144 lineto 144 144 lineto 144 72 lineto
> closepath stroke
> showpage % <= this spits out a page.
> %%EOF <= optional, printer should not care.
> - - - Unsnip! - - -

It does produce a little square. No ^D needed.

Pierre Jelenc

unread,
May 1, 2009, 5:39:06 PM5/1/09
to
Chuck McKinnis <mcki...@sandia.net> writes:
>
> I just tested by installing the same update as you have, selecting a
> sample file, and printing it to my Lexmark E260dn (a PS printer).

This is what I was trying to print:

http://www.centralparknyc.org/site/DocServer/Refreshments_Restrooms.pdf

Chuck McKinnis

unread,
May 1, 2009, 11:42:33 PM5/1/09
to
On Fri, 1 May 2009 21:39:06 UTC, rc...@panix.com (Pierre Jelenc) wrote:

> Chuck McKinnis <mcki...@sandia.net> writes:
> >
> > I just tested by installing the same update as you have, selecting a
> > sample file, and printing it to my Lexmark E260dn (a PS printer).
>
> This is what I was trying to print:
>
> http://www.centralparknyc.org/site/DocServer/Refreshments_Restrooms.pdf
>
> Pierre

I just printed that page (map and all) using Lucide.

--
Chuck McKinnis

Steve

unread,
May 2, 2009, 7:44:01 AM5/2/09
to
rc...@panix.com (Pierre Jelenc) writes:
>Steve <Bo...@Embarq.com> writes:
>>
>> Forcing a page with CTRL-L means the printer is _not_ processing
>> PostScript code.
>
>I did that after flashing had stopped, just to see what would happen,
>precisely in case it had benn processing text. Clearly it had not since
>the page ejected was blank.

Okay, but that means your printer is set up to choose between
PostScript and PCL. (Not that that matters much.)

>> 10 megs? Eek! You may be running out of memory. The HP 6MP was
>> not their high end. But not if produced by a reasonable application.
>
>Agreed, it sounds awfully large for a 1 page leaflet! Incidentally, the
>original test PDF I was using is here:
>
>http://www.centralparknyc.org/site/DocServer/Refreshments_Restrooms.pdf
>
>> If your printer defaults to PostScript, the following code snippet
>> will print a page.
>>
>> - - - Snip! - - -
>> %! <= first two characters indicate a PostScript file in many circumstances.
>>
>> 72 72 moveto 72 144 lineto 144 144 lineto 144 72 lineto
>> closepath stroke
>> showpage % <= this spits out a page.
>> %%EOF <= optional, printer should not care.
>> - - - Unsnip! - - -
>
>It does produce a little square. No ^D needed.

Good. You can print PostScript correctly. Have GSView
print to an image like BMP and print that. You may be running out of memory.

Steve N.

Peter Brown

unread,
May 2, 2009, 9:42:53 AM5/2/09
to
Hi Pierre

Pierre Jelenc wrote:
> Steve<Bo...@Embarq.com> writes:
>>
>> Forcing a page with CTRL-L means the printer is _not_ processing
>> PostScript code.
>
> I did that after flashing had stopped, just to see what would happen,
> precisely in case it had benn processing text. Clearly it had not since
> the page ejected was blank.
>
>> 10 megs? Eek! You may be running out of memory. The HP 6MP was
>> not their high end. But not if produced by a reasonable application.
>
> Agreed, it sounds awfully large for a 1 page leaflet! Incidentally, the
> original test PDF I was using is here:
>
> http://www.centralparknyc.org/site/DocServer/Refreshments_Restrooms.pdf
>

I use CUPS for OS/2 http://svn.netlabs.org/ecups/wiki/CupsPort to
print to my non-postscript printer (CUPS uses gs8.64).

The above pdf prints fine from Acrobat Reader - print as image selected
- using the CUPS printing package.

Of interest may be the size of the doc: 5370k, 1 page.


Regards

Pete

0 new messages