Discussion:
printer help
(too old to reply)
Isaac Joshua Chua
2015-04-13 03:35:31 UTC
Permalink
Raw Message
Hi guys! I would like to know if you know how to set the printer so that it will print right away after the 1st command. It is fine when I am printing long things but when I try to print half short bond length, then I need to issue the print command several times.
Ian Goddard
2015-04-14 10:21:20 UTC
Permalink
Raw Message
Post by Isaac Joshua Chua
Hi guys! I would like to know if you know how to set the printer so that it will print right away after the 1st command.
The normal way to handle a printer is via a queue. An application
program writes a file & submits it to a queue. The queue handler then
takes each file from the queue & prints it. This depends on the file
being complete before being submitted. You can't start a file & enter
it into the queue before it's complete. If you did that the queue
handler would at best truncate the file at the point when it hits the
current end and move onto the next job. At worst the whole queueing
system might crash and burn.

I don't know about Windows but on a Unix-like system in order to do what
you seem to be attempting you would need to do the following:

1. Identify the device name for the printer in /dev (remember that in
Unix everything looks like a file, that includes your printer).

2. Remove the printer from the queueing system - CUPS, lpd or whatever.

3. Set the permissions on the device to allow the user of the
application to write to it. You might have a fight with udev about this.

4. Use the OUTPUT statement of the report writer to write the report to
a file specifying the device name (full path starting with /dev) as the
file to write to.

You'll need to ensure manually that only one such application is writing
to the printer at any one time, otherwise the outputs of the various
applications will be interleaved.
--
Ian

The Hotmail address is my spam-bin. Real mail address is iang
at austonley org uk
Loading...