我有一个带有嵌入式PDF的网页.我的代码看起来像这样:
<embed
type="application/pdf"
src="path_to_pdf_document.pdf"
id="pdfDocument"
width="100%"
height="100%">
</embed>
Run Code Online (Sandbox Code Playgroud)
我有这个javascript代码用于打印我的PDF:
function printDocument(documentId) {
//Wait until PDF is ready to print
if (typeof document.getElementById(documentId).print == 'undefined') {
setTimeout(function(){printDocument(documentId);}, 1000);
} else {
var x = document.getElementById(documentId);
x.print();
}
}
Run Code Online (Sandbox Code Playgroud)
执行此代码时,Acrobat插件将打开众所周知的打印对话框.像这样的东西:

两个问题:
关于我的系统的更多信息:
操作系统: Windows XP
浏览器: Internet Explorer 7
PDF插件: Acrobat Reader 9