I tried the following two methods, but both fail.
1. open a new window:
Expand|Select|Wrap|Line Numbers
- win=window.open("","","width=5 height=5");
- win.blur();
- win.document.location="http://www.mydomain.com/mydoc.pdf";
- win.print();
- win.close();
Expand|Select|Wrap|Line Numbers
- iframe = document.createElement("IFRAME");
- iframe.setAttribute("id","testiframe");
- iframe.setAttribute("name","testiframe");
- iframe.setAttribute("src", "http://www.mydomain.com/mydoc.pdf");
- iframe.style.display = "none";
- window.document.body.appendChild(iframe);
- var x = document.getElementById("testiframe");
- x.focus();
- x.print();
P.S. I found this forum is very helpful. It helps me solve many problems, so I posted this message first time here. Thanks for your answer in advance!