Printing in ASP.NET (Replay to John Timney (Microsoft ASP.NET MVP))

  • Thread starter Thread starter Sharone Shani
  • Start date Start date
S

Sharone Shani

Hi John, thanks for your replay.

What I'm trying to do is as follows:

We are hosting a server, which is used by our clients. We
have a printing object written in Visual Basic.NET. I
want to use this object to allow our clients to print
some of our web pages, using this object, in their own
local printer. In other words, I need to somehow trasform
this Printing object into HTML so I'd be able to send it
back to the client (the client machine of our client) so
he'd be able to print it in his own local printer.

Is it possible?

Thanks again,

Sharone.

John Timney Wrote:

You cant print on behalf of the client to the clients
printer as that would
be quite a security breech - you could probably print to
a shared printer
assuming you could get the asp.net account to run as
someone who has access
to a shared printer from the server. I would start by
loggin into the
server as a user with access to that printer and checking
it will work - and
then using Impersonation to alter who the asp.net account
runs as and work
from there.
 
You can provide this object, for your clients, as long as they have .NET.
The easiest way to make it "printable" is to have a custom extension that
gets registered for the printer control and run the printer control in a
service. This is probably more than you want to take on right now.

If you are providing client stats, et al, consider making a web service and
an app that can consume the data. Provide that to the clients, along with a
sample source project that uses it, and allow them to tailor it, if they are
so inclined.

The only thing you can do to provide an object to a client, other than
serialization of the object for consumption on a system that is aware of the
object (like the custom extension example), is JavaScript, which is limited
on the client.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

**********************************************************************
Think Outside the Box!
**********************************************************************
 
Back
Top