HTML PDF Viewer

后端 未结 3 1200
我寻月下人不归
我寻月下人不归 2021-02-06 18:36

Is there any alternative way to view PDF files on the web instead of using Acrobat Reader? I need to control the viewer to programmatically trigger the printing of the document.

相关标签:
3条回答
  • 2021-02-06 18:50

    There are quite a few options for document views online, some open source others proprietary. Personally, I've had good experiences with Flex Paper. This will allow you to include the document view on your website, and there are some developer resources which will allow you to integrate it with the functionality you're looking for.

    For demos, see here: http://flexpaper.devaldi.com/demo/

    0 讨论(0)
  • 2021-02-06 19:06

    The easiest I would think is to use the Google Doc Viewer:

    <iframe src="http://docs.google.com/viewer?url=**PathToMyPdfFile.pdf**&embedded=true" width="600" height="780" style="border: none;"></iframe>
    

    You need to host your PDF files somewhere online, may be in a file in your public website ( it needs to be a public site) and put the link to the PDF file in "PathToMyPdfFile.pdf" in the iFrame above. Then set the width and height you need.

    Google even generates this code for you here:

    https://docs.google.com/viewer
    

    Then simply put this iframe anywhere in the body of your page where you want to display your PDF. This also supports many other file formats too.

    0 讨论(0)
  • 2021-02-06 19:08

    You can use FoxIT PDF viewer. It's free and programmable.

    0 讨论(0)
提交回复
热议问题