javascript - Can anyone recommend a plugin that can preview PDF in dom elements?
ringa_lee
ringa_lee 2017-05-19 10:09:10
0
2
580

Similar to the effect in the picture, now I use a PDF plug-in called objectPDF.js. After using it, the dom elements behind the PDF preview plug-in are gone.

ringa_lee
ringa_lee

ringa_lee

reply all(2)
Peter_Zhu

确定你用对了 PDFObject 了吗?

  1. Create a container to hold your PDF

    <p id="example1"></p>
  2. Tell PDFObject which PDF to embed, and where to embed it

    <script src="/js/pdfobject.js"></script>
    <script>PDFObject.embed("/pdf/sample-3pp.pdf", "#example1");</script>
  3. You can optionally use CSS to specify visual styling, including dimensions, border, margins, etc.

    <style>
      .pdfobject-container { height: 500px;}
      .pdfobject { border: 1px solid #666; }
    </style>
刘奇

Give me the code structure. This is not a problem that can be seen at a glance

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template