Embed the PDF in a webpage without using the built-in PDF viewer

前端 未结 5 467
孤城傲影
孤城傲影 2020-12-15 10:18

Currently I am using the standard way to embed an pdf to the browser, however, the built-in pdf viewer for my target browser is not working as expected. I would like to forc

5条回答
  •  太阳男子
    2020-12-15 10:45

    Trick Chrome and Firefox (and maybe other browsers) into displaying the PDFs using the Adobe Reader plugin (for full PDF Open Parameters support among other benefits) by using one of the following 'Adobe PDF in XML Format' types in your embed code:

    application/vnd.adobe.pdfxml
    application/vnd.adobe.x-mars
    

    This works fine as of my answer today and I'm hopeful it will continue to work fine. I'm using it currently with standard PDF files as a workaround for embedding PDF files in the browser that need to use the Adobe PDF plugin rather than the browser's built-in PDF rendering. Even though my PDF files are standard (non-XML) files, they appear to load just fine with this new application type parameter.

    
        shree 
    
    

提交回复
热议问题