Donate SIGN UP

HTML Code

Avatar Image
Kerplunk | 14:10 Mon 20th Mar 2006 | Technology
8 Answers

Is it possible to set a link in a web page to print a document when clicked? I do not want the document to open, just print.


Thanks for any help.

Gravatar

Answers

1 to 8 of 8rss feed

Best Answer

No best answer has yet been selected by Kerplunk. Once a best answer has been selected, it will be shown here.

For more on marking an answer as the "Best Answer", please visit our FAQ.
Here ya go :

http://www.net-sites.com/sitebuilder/scripts/script3.asp

It's more JavaScript than HTML though.
Question Author
Thanks for the reply, but I don't want to print the current page being displayed I want to print a pdf file preferably without opening it in the browser.
I don't think you can do that, sorry.
Question Author
Yeah, as I thought. Something I have been asked to do, but have never seen it done. They don't like it when you say it isn't possible.

That'd means when the user clicks on it, the PDF would have to download, and then they'd need a print routine that'd recognise and be able to print a PDF.


Usually you have a PDF viewer installed, that opens the document and then interfaces with the windows print routine.


Good problem, I'm interested if anyone has a solution. But how do you know your user will be able to open PDFs?

Question Author

Because they have Acrobat reader installed !

I know very little about programming (Hello, world!) but could you Open then Hide an Acrobat window, tell it to print the document and then Close it � still out of sight of the end-user? The visible effect would be much the same.
this cannot be done, in general.

perhaps it's possible with VBScript, but this only runs on internet explorer. may be ok in a corporate environment that uses IE only, though. but i'm not even sure it's possible with VBScript (I doubt it, actually).

1 to 8 of 8rss feed

Do you know the answer?

HTML Code

Answer Question >>