472,145 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,145 software developers and data experts.

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 6238
"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 Saiars | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.