My company has an application which produces
printer output. PCL4 and a few other flavours.
We need to send this output to LP Daemons running
on Linux and other Unix platforms. I have written
an LPR client that connects directly to an LP Daemon
on a remote system. This is based on an example in
a Unix Network Programming book by W. Richard Stevens.
Being a novice sockets programmer, I was dismayed to
find halfway through writing this that in order to
send output to the LPD, I have to tell it the size
of the file first... This results in having to spool
the whole file on the system running our software before
I can send it. As these files drive high speed laser printers,
they can be gazillions of pages long and gagabytes in
size. Well bigger than will fit on a couple gig disk
anyway. So, what I am wondering in my rambling sort
of way is if there is anyway around this? If I tell
the LPD the file is say 20 gigbytes in size, and then only
send it 2 gigbytes and close the connection... will it
still print, will there be error messages? I know that
the file will spool to disk at the LPD end, I am just
trying to avoid having two mongo disks and spooling the
whole thing twice. Any experience along these lines
that anyone would like to share would be most appreciated.