Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using ASP and Javascript to print

Status
Not open for further replies.

ChefSausage

Programmer
Oct 19, 2002
36
US
I am running an ASP application that extracts images from a remote server. The top frame of the page shows the number of the image to view (as a link), and the bottom frame links directly to the selected image (it uses IE's internal TIFF viewer to display the .TIFF image.

The problem I'm having is trying to find a way to have a "print all" option that will have ASP query all the images for printing at once. Would this require all the images to physically appear in the bottom frame for this to work or can there be a work around to this (each image is huge in terms of dimensions and filesize).
 
The only way I have ever done this is with the JavaScript window.print(). This does however require the images (or whatever data you are working with) to be displayed on the page. This is because you are using IE's interface. There is no method (that I know of) to programaticly open the IE print interface, and pass it file(s) to print, w/o it being on the screen.

I have done something simular, but my solution was to create a "print" button, and have it open up a small window. This window would display all of your data, and during an OnLoad, do your window.print(). After it prints, then do a window.close. You would basicly be "fakeing" the user into thinking it is just a simple popup to print. Not the cleanest thing it the world, but come on.. its just ASP.

Hope this helps.

Mark
 
I thought about that, but the problem is these images are huge and it can take a few minutes for all of them to load into the browser window before the print option appears. I can't resize the image dimensions so that they load in a 1x1 pixel for speedier loading as printers are wysiwig.
 
Sounds like you need to find a "non-web" solution...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top