Re: I want to write a network printer server...



Then why not just make your printer a shared printer? Then you don't need to do anything
special. This is a different question than the one you asked, which was how to make a
server which could accept images and print them.
joe

On 1 Aug 2006 08:45:56 -0700, "KraftDiner" <bobrien18@xxxxxxxxx> wrote:


Joseph M. Newcomer wrote:
The protocol is whatever you want it to be. Feel free. You would use TCP/IP at the low
level, but above that you get to specify whatever you want, such as metadata (do you want
a caption to print? A cover ***? Plan on metadata even if you don't use it today). Is
the image JPG? BMP? TIFF? Are you going to support compression? You can do anything
you want. Presumably a client of your own devising will be sending these images to a
server of your devising, so you can make it do anything you want.

There's no magic about protocols. Open a socket, start sending data. Upon completion of
the data, close the socket. Done.

You could send the image as a sequence of raw binary bits, although this is very limiting;
more likely you might consider using XML, perhaps with the bits sent as CDATA, although
this requires converting each byte to some printable form (such as two hex characters)
thus doubling your transmission time. Or, you could use a protocol where you send the
metadata as tagged XML, followed by raw binary data for the image itself. The
possibilities are endless, and there's no particular reason to choose one protocol over
another unless you have some outside constraint about what it should look like.
joe


Well I guess the first thing is that the server should appear and
behave as a shared printer.
So that leads me to believe that there is something other than a simple
socket
listener.



On 31 Jul 2006 16:31:50 -0700, "KraftDiner" <bobrien18@xxxxxxxxx> wrote:

I would like to write a network printer server that recieves graphics
over the net.
It would then send those graphics to the local/default printer on the
windows machine.
Can someone point me in the right direction for the protocol that one
must provided
as a windows printer server?

Thanks.
Joseph M. Newcomer [MVP]
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
Joseph M. Newcomer [MVP]
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.