Controlling your printer with ASP

Results 1 to 2 of 2

Thread: Controlling your printer with ASP

  1. #1
    DavidA Guest

    Default Controlling your printer with ASP

    Is there a way to setup the properties of your printer with ASP? Such as margins... printer... type of paper (letter,legal,envelope, etc.)... number of copies.. basically all the settings that you can control by going to the printer&#039s properties button when you print from any application. Thanks.

  2. #2
    Join Date
    Dec 1969

    Default RE: Controlling your printer with ASP

    I am not sure if you are interested in printing on Client side (Scripting) or Server side (ASP) so I will cover both. To do client side you can refer to the following address for information on client side printing for IE4 and IE5:<BR><BR>It does work with IE4 as I am using it in production code. I am targeting a hidden frame for printing and write out my formatted HTML to the hidden frame then start the printing. It basically pops up the File/Print... Box and the user can go from there on your web page. <BR><BR>If it is server side, then you have multiple options. You could (a) use API calls to set default printer settings through a VB ActiveX DLL class that you create, OR (b) again create a VB ActiveX DLL (in-process server) with a class that sets properties of the default Printer object in VB OR (c) if you are using an ActiveX Server such as Word or Excel and creating documents in your ASP code then you could use methods of those objects to set printer settings. And there are probably other ways. I would suspect (a) is the most reliable, since option (b) would assume no bugs with the VB printer object and there always seems to be problems with that. I am using Excel as an out-of-process server for an application that I have developed and I would think that printing from it would be easy as long as you have your printer properly attached to your web server. Those kind of properties should be available from Excel or Word&#039s object model and you can use the Object Browser in VB IDE to look at the complete object model for either one. If you have questions or clarifications please let me know.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts