Printing a page

Results 1 to 3 of 3

Thread: Printing a page

  1. #1
    Jay Reid Guest

    Default Printing a page

    I&#039m looking to a jscript or vbscript method to print the current web page. I&#039m familiar with window.print I&#039m looking for something that allows more options. To make things easier this will be for I.E. 4.x only.

  2. #2
    Join Date
    Dec 1969
    Posts
    2,849

    Default RE: Printing a page

    ASP is not designed for printing. There are third party components that are specially designed for detailed, formatting printing through a browser. See http://www.active4.com/ for some of those components!

  3. #3
    Join Date
    Dec 1969
    Posts
    9

    Default RE: Printing a page

    To do client side you can refer to the following address for information on client side printing for IE4 and IE5: http://msdn.microsoft.com/workshop/Author/script/DHTMLPRINT.asp<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 call the javascript function to 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
  •