问题描述:

I need a method that really works in IE, Chrome and Firefox to show a PDF in an iframe. I can not use google docs GView to do this... I need another method that is 100% functional. Give me some example please guys... I've tried PDFJS and PDFObject, but they do not work.

Thanks a lot.

网友答案:

PDF Object works to create a view of a pdf in an object. You can create an object, and reference it to an id:

HTML:

JavaScript:

var pdf = new PDFObject({
    url: "sample.pdf",
    id: "object",
    pdfOpenParams: {
          view: "FitH"
    }
}).embed("object")

Works cross browser! You just need to include PDF Object code in your project.

相关阅读:
Top