Re: New version (Re: How to open & write to a USB port?)
- From: "A.D. Fundum" <what.ever@xxxxxxxxxx>
- Date: Thu, 22 Dec 2011 17:29:51 +0100
From dos program text file prints immediately, via spooler
also. Printing invoice with bar code makes no diffrence.
So the delay is avoidable, and it should be solved. Just wondering: is
the last character of the text file an EOF (26)?
/* LASTCHAR.CMD (not tested) */
CALL CharOut '','What file? '
PARSE PULL filename
IF Pos('"',filename',1)>0 THEN DO
PARSE VAR filename '"' filename '"' .
END
size=Stream(filename'C','QUERY SIZE')
IF size<>'' THEN SAY 'Last:' C2D(CharIn(filename,size,1))
If not,(what's the last character,) and assuming the last page is
always printed with a delay: what happens if you print a space
character, and add an EOF to this near-empty text file (or print a dot
instead of a space, if your printer ignores blank pages)? To create
such a file:
REXXTRY CALL CharOut 'Print.Me!',' '||D2C(26)
Or try printing this file twice, quickly (i.e. clearly within the
delay of a few minutes):
REXXTRY CALL CharOut 'PrintMe!.too',' '
Considerations: maybe the printer is waiting for an (explicit
end-of-job XOR time-out) when this OS/2 method is in use. If so, the
created file "Print.Me!" should eject faster because it adds an EOF.
The file "PrintMe!.too" can produce 2 pages (one page per job), or one
page (with a job implicitly continued within the delay). Again,
replace the spaces between the '' characters with e.g. a dot if your
printer ignores blank pages.
BTW, chances are the local helpdesk of the manufacturer of your
printer (HP, isn't it?) is more than willing to help the author of a
(generic) printer "driver", without you (the developer) having to RTFM
of a product you don't own). Just tell what you (the developer) are
doing, and try to not mention OS/2 (too easy to say it isn't
supported). Try explaining it in a generic way instead.
--
.
- Follow-Ups:
- Re: New version (Re: How to open & write to a USB port?)
- From: Peter Flass
- Re: New version (Re: How to open & write to a USB port?)
- References:
- New version (Re: How to open & write to a USB port?)
- From: Alex Taylor
- Re: New version (Re: How to open & write to a USB port?)
- From: Heikki Kekki
- Re: New version (Re: How to open & write to a USB port?)
- From: Alex Taylor
- Re: New version (Re: How to open & write to a USB port?)
- From: Heikki Kekki
- Re: New version (Re: How to open & write to a USB port?)
- From: Alex Taylor
- Re: New version (Re: How to open & write to a USB port?)
- From: A.D. Fundum
- Re: New version (Re: How to open & write to a USB port?)
- From: Heikki Kekki
- New version (Re: How to open & write to a USB port?)
- Prev by Date: Re: Ending a program with running threads
- Next by Date: Re: Ending a program with running threads
- Previous by thread: Re: New version (Re: How to open & write to a USB port?)
- Next by thread: Re: New version (Re: How to open & write to a USB port?)
- Index(es):
Relevant Pages
|