Referencing the VB Printer object in ASP
Posted on 2001-08-08
I have some VB code that prints output using the VB Printer object. When I compile this code into a VB project and run it on my local machine, it works fine. Now, I'd like to convert that code so that it runs as VBScript in an ASP page.
I have two choices. Convert my VB code to VBScript - in which case I get errors when I reference Printer.Print (do I need to do some CreateObject statement to create a printer object?)
Or, I can encapsulate my Printer.Print statements in a method inside of a COM object that I'm calling from the ASP page. I'm fine with this second option, as I have a COM object I'm working with already. However, I get some unhandled Printer Error kicking back to the ASP page.
I'm a little confused about what physical printer the com object would be referencing. Is it the printer connected to the Web Server and defined under the context of the System User? That wont do me much good.
Basically, I want my Printer.Print statements to be sent to the browser's default printer on the client's machine.
Any ideas on how to approach this?