Adobe Reader:
注:以下内容需要本地安装过Adobe Reader后才可以使用
<html>
<head>
<title>Adobe打印</title>
<script type="text/javascript"">
function printPDF() {
var adobeReader = document.getElementById("adobeReader");
adobeReader.click();
adobeReader.setActive();
adobeReader.focus();
adobeReader.print();
}
</script>
</head>
<body onload="printPDF()">
<embed id="adobeReader" src="c:\FoxitActiveX30_Manual.pdf" width="0" height="0" />
</body>
</html>
Foxit Reader:
注:以下内容需要在本地注册或安装Foxit Reader SDK ActiveX才可以使用,地址[Foxit Reader SDK ActiveX]
<html>
<head>
<title>Foxit打印</title>
<script type="text/javascript"">
function openFile() {
var foxitReader = document.getElementById("foxitReader");
foxitReader.OpenFile("c:\FoxitActiveX30_Manual.pdf", "");
foxitReader.PrintWithDialog();
}
</script>
</head>
<body onload="openFile()">
<object id="foxitReader" classid="clsid:DB2189DF-ABF4-445A-A4E5-BF32F2CEA4D9" width="600" height="400"></object>
</body>
</html>