|
引入Pdfobject.js无法正常显示,但能够另存为
var url = justep.Request.convertURL("/UI/system/components/excel/export/download.j"+"?action=downloadP_constructReportBudgetDetailAction&constructReportBudgetId=" + id+"&downloadFilename=" +encodeURI(detailFile)+"&$downloadFilename=" +encodeURI(detailFile+".pdf"));
url = justep.Request.setBizParams(url);
var mynode = document.getElementById("e1");
PDFObject.embed(url, mynode);
var options = {
pdfOpenParams: {
pagemode: "thumbs",
navpanes: 0,
toolbar: 0,
statusbar: 0,
view: "FitV"
}
};
var myPDF = PDFObject.embed(url, mynode,options);
//$("#div-iframe3").attr("src",url);
var el = document.querySelector("#results");
el.setAttribute("class", (myPDF) ? "success" : "fail");
el.innerHTML = (myPDF) ? "PDFObject successfully added an <embed> element to the page!" : "Uh-oh, the embed didn't work.";
X5的使用给人感觉很差,引入一个新的插件都那么费劲,希望有所改进
|
|