Hi guys, I have a JSP page which has a hyperlink to a pdf file. I want to print this PDF file without opening it... Can someone help me out with this, and it is real fast and urgent...
You are going to have to open the file in order for it to print... Now you have 2 options. Since you are going to be opening a pdf, it is going to take control of the browser. You are not going to be able to run any commands to print it. There is another method. You can use frames and have the top frame(zero height) print the bottom frame containing the pdf and close the entire window after calling print. BUT the problem you are going to run into is the following,...You would not know how long to set the timeout for since you do not no page loading time. 2 when it says to print, the print dialog is going to pop up so it will not be so seamless when it closes, and some browsers may not even want to print it. Sure I lost you with my bad grammer..... Pain in the rear....eh.... But this is good since I would not want someone printing 1000 pages on my printer when I visit a website! Persoanlly I would say.....click on the link and print out this form.... Eric
Sending this to the HTML and Javascript forum, since it's more dealing with the proper use of hyperlinks and all that gobbledy gook Eric is talking about
This is a dupe of this topic in the JSP forum. I think a server-side approach is best, but in any case, one of these should be closed and refer to the other. Since I can, I'm closing the topic in JSP and referring it here. (Though I actually think Servlets is the most appropriate locale.) bear