469,921 Members | 2,183 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,921 developers. It's quick & easy.

Intercept Data Sent to Printer and Insert Into Database

A legacy application (I don't have the source code for the
application) transmits reports to a printer. One of the
reports that are sent to the printer needs to be inserted
into a database. With VB.NET can I intercept items that
are sent to the printer? Can I read what is being sent to
the buffer with VB.NET and save to a file? Please let me
know if this is possible with VB.NET. Should I be using a
memorystream and window services? Please let know if you
have any ideas. I could use all the help that I can get.
Thanks

Nov 20 '05 #1
1 6105
"Patriicia" <tr*******@hotmail.com> wrote in message
news:4d****************************@phx.gbl...
A legacy application (I don't have the source code for the
application) transmits reports to a printer. One of the
reports that are sent to the printer needs to be inserted
into a database. With VB.NET can I intercept items that
are sent to the printer? Can I read what is being sent to
the buffer with VB.NET and save to a file? Please let me
know if this is possible with VB.NET. Should I be using a
memorystream and window services? Please let know if you
have any ideas. I could use all the help that I can get.


The only *easy* way to do this would be to setup an IP port, then tell the
legacy app to print to that port. Next, you would need to setup a server in
VB to listen on that port, and then pass the data onto the final
destination. So you would be making a mini proxy server, just remember to
pass back any info that may come from the printer.

A better way would be to create a custom port, or to subclass the print
spooler/print messages, but this is beyond me, sorry. I'm sure if you dig
around in the Platform SDK / MSDN library long enough you will find what you
need.

HTH
~
Jeremy

Nov 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

32 posts views Thread by Neil Ginsberg | last post: by
5 posts views Thread by Chris | last post: by
3 posts views Thread by =?Utf-8?B?QnJ5YW4=?= | last post: by
reply views Thread by Waqarahmed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.