I wonder if you actually need to wait before printing -- won't the print job handle that for you? And I truly hope no modern browser will allow you (or any website for that matter) to print without that confirmation dialog (some old browsers used to do that, a long time ago).
+1
A:
Arjan
2009-06-10 13:45:36
Hi Arjan,Thanks for your quick reply. If I call .print method before PDF file is loaded i get a Javascript error something like 'this method is not allowed for this object' (I get the error message in spanish).On your second apreciation I think that PDF is not printed by browser is printed by Acrobat plug-in :-)
SourceRebels
2009-06-10 13:50:01
But that plugin could be present in anybody's browser, right? If so, then I don't expect that confirmation to disappear. Does the onload event for the body element fire before your PDF is loaded?
Arjan
2009-06-10 13:57:54
Oh, it seems to me that Internet Explorer supports onload() for embed as well: http://msdn.microsoft.com/en-us/library/cc197055(VS.85).aspx
Arjan
2009-06-10 14:00:24
@Arjan: Its a corporate Intranet application, all clients have Acrobat reader version 9 installed and Internet Explorer 7 :-), yes, the onload is fired before PDF is loaded and onload event of embed its having same behaviour.
SourceRebels
2009-06-10 14:29:06
Hmmm, that's odd, the onload firing too early. Let's assume you'll have more luck finding that ActiveX control then...
Arjan
2009-06-10 14:41:43
Thanks Arjan. We are using a kiosk-like OS and the solution for this issue is provided by this software. Thanks for your reply
SourceRebels
2009-06-15 09:28:24
+3
A:
You are not going to be able to print silently with plain old JavaScript. How would you like your printer to start printing out 100000000 pages of all black. Not a good thing. If you want to print silently and have it work for Internet Explorer only, there are ActiveX controls out there that can do it. This requires higher security settings for your page and for your users to really trust your site.
epascarello
2009-06-10 14:06:57
Thanks, its for corporate intranet not for the Internet, they must trust! :-) Can you point me to this ActiveX. I will evaluate it.
SourceRebels
2009-06-10 14:30:33
A:
I know it is late, but I am trying to solve similar problem. Can you please reveal what your solution was if you found it? In my case, I want to know how long to wait before the PDF is completely downloaded so I can print it. I am not concerned about the silent print though. Thanks,
Milind
2010-02-06 22:59:25
Finally our web runs in a kiosk-like environment, this functionality was included in this software :-) I'm sorry at the end not doing this from regular javascript.
SourceRebels
2010-02-09 05:59:24