LPR Programming question

LPR Programming question

Post by $Bill Dosset » Fri, 09 May 1997 04:00:00



Hi,

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.

Thanks

$bill

 
 
 

1. Sockets/LPR Programming Question

Hi,

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.

Thanks

$bill

2. USB HP8210e CD Burner

3. Has lpd/lpr been fixed for lpr -p ?

4. Apache and SSI

5. Is lpr outdated, unsupported?, ie. lpr or lp?

6. Recover partition info from memory

7. Looking for an lpr <ip address> program.

8. /rdb for LINUX

9. Where to get lpr program for Slackware 3.1?

10. giving a 'lpr' command from within a C program

11. Unix Programming & Linux Programming Question

12. Parallel Port programming question, was "Serial Port Programming"

13. Linux programming question / Network Programming