只需要在pdf路径后面加上#scrollbars=0&toolbar=0&statusbar=0即可去除工具栏,如
// 第一种加载方式
var obj = document.createElement("embed");
obj.setAttribute("src", pdf+"#scrollbars=0&toolbar=0&statusbar=0")
obj.setAttribute("type", "application/pdf")
obj.setAttribute("width", "100%")
obj.setAttribute("height", "600")
obj.setAttribute("internalinstanceid", "81")
document.body.appendChild(obj);
// 第二种加载方式
<script type="text/javascript" src="js/pdfobject.js"></script>
<script type="text/javascript">
window.onload = function (){
var myPDF = new PDFObject({ url: "sample.pdf#scrollbars=0&toolbar=0&statusbar=0" });
console.log(myPDF);
myPDF.embed();
};
</script>