This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Local printer access question..


> -----Original Message-----
> From: cygwin-owner@cygwin.com [mailto:cygwin-owner@cygwin.com]On Behalf
> Of Igor Pechtchanski
> Sent: Tuesday, July 29, 2003 7:16 PM

> > > Was my writing unclear?
>
> No, no, it was my late night reading...

 Ahh... glad to hear that ;-)

> > > > Also, try setting up a dummy printer that prints to
> > > > file and see if that works.
> > > >     Igor
> > >
> > >  Hrm... why didn't I think of that! >:-P

--8<--
> > >  Works like a charm... so this should prove one thing:
> > > Cheap HP printers aren't up to all the tasks you could expect.
> > >  :-/

> > I don't know about the DOS print command, but lpr is just a raw
> > spooler. It is intended to be used as a filter to send data *already
> > formatted for a specific printer* to a print queue. In other words, it
is
> > intended to  send postscript data to a postscript printer, or PCL data
to a
> > PCL-capable printer. lpr knows nothing about any printer and makes no
> > attempt to inject printer-specific formatting codes. *If and only if*
your
> > printer can directly print a text file will using a command like
> >
> > lpr -P some_device file.txt
> >
> > work. You might try the following. Using notepad or a similar *Windows*
app,
> > try printing your autoexec.bat file to your Deskjet printer, but in the
print
> > dialog, check the box that says "Print to file" so that the formatted
data
> > stream ends up in a file instead of being sent directly to the printer.
Then,
> > try spooling that file using lpr and/or the dos print command. Let me
know what
> > happens.
> >
> > --Rick

 Using a single page HTML print from IE6 in "zz.prn"

These do "work":
	D:\>print /D:LPT1: zz.prn
	D:\zz.prn is currently being printed

	D:\>print /D:\\P450\DJ720C zz.prn
	D:\zz.prn is currently being printed

This one has problems:
	$ cat /cygdrive/d/zz.prn | lpr -l -PLPT1:

 The first doc prints. Any following documents causes the printer to
"hang" - turning it off is enough to be able to print yet another doc. On
one occassion I got something that I've never seen before: Power, "no paper"
and "low ink" leds rapidly flashing in that sequence ;-7

This one "works"
	$ cat /cygdrive/d/zz.prn | lpr -l
	$ echo $PRINTER
	//P450/DJ720C
	$

with one exception on all of them; they do not eject the page at the end of
printing. Unless you start another document print...

>
> Hannu,
>
> You could also try using 'a2ps' or 'enscript', both of which are available
> as Cygwin packages.
> 	Igor

Hmm...
 a2ps - ascii to postscript;
How do I make that readable for a deskjet; I believe it talks PCL.

 enscript - ps, html, HTML, RTF, ANSI... but no PCL.

Now I _assume_ that this is PCL - or maybe some other "native" stuff:

$ cat /cygdrive/d/zz.prn | od -t x1z | head
0000000 24 01 00 18 01 86 00 18 07 00 00 01 00 00 00 00  >$...............<
0000020 00 02 00 00 00 00 01 f4 01 00 00 00 24 00 00 04  >............$...<
0000040 de ad be ef 24 01 00 18 01 8f 00 18 07 00 00 02  >....$...........<
0000060 00 00 00 04 00 02 00 00 de ad be ef 02 00 00 00  >................<
0000100 24 01 00 20 01 83 00 20 05 00 00 01 00 00 00 00  >$.. ... ........<
0000120 00 02 00 00 28 2d 00 41 2d 32 00 46 2d 32 00 46  >....(-.A-2.F-2.F<
0000140 2d 32 00 46 24 01 00 14 01 81 00 14 07 00 00 01  >-2.F$...........<
0000160 00 00 00 00 00 02 00 00 01 01 46 50 24 00 10 8c  >..........FP$...<
0000200 22 c1 80 0a 2d 02 c1 18 83 f8 9b 78 c2 fc ff 0a  >"...-......x....<
0000220 2d 04 c2 07 0c 1c c1 07 0a 2d 2d 2d c7 80 e0 f0  >-........---....<

 I have a recollection of seeing something similar for PCL/Deskjets a few
years back... If I just could remember the name... google!

http://packages.debian.org/unstable/text/djtools.html

Depends on:
 libc6 (>= 2.3.1-1)
GNU C Library: Shared libraries and Timezone data
 libgcc1 (>= 1:3.2.1-1)
GCC support library
 libpaper1
Library for handling paper characteristics
 libstdc++5 (>= 1:3.2.1-1)
The GNU Standard C++ Library v3

What do you say guys? ;-) does it fit within cygwin?

I downloaded djtools_1.2.5.tar.gz - 158702 bytes... Will have a look at it
ASAP.

/Hannu E K Nevalainen, B.Sc EE/Microcomputer systems, 59?14'N, 17?12'E.
--END OF MESSAGE--


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]