1024programmer HTML5 Detailed explanation of html to realize the function of online preview of word, excel, pdf and other files (with code)

Detailed explanation of html to realize the function of online preview of word, excel, pdf and other files (with code)

Detailed html implementation online The function of previewing word, excel, pdf and other files (with code) The function is very convenient, let’s take a look together, if there is any deficiency, I hope everyone can point it out.

Directly refer to the method provided by Microsoft through iframe


In https

Note: Links containing Chinese need to be URL encoded, and the document must be publicly accessible on the Internet

Official Use Document

pdf online browsing

PDF.js download address

http://jhyt.oss-cn-shanghai.aliyuncs. com/images/1531367199089_PDFObject.js

How to use

Introduce pdf.js file

c

Create a p for display

Dynamically add the pdf address that needs to be browsed through js

 var  optiOns = {
             height: "550px",
             pdfOpenParams: {view: 'FitV', page: '0' },
             name: "mans",
             fallbackLink: "

Your browser does not support this pdf, please download the latest browser

" }; PDFObject.embed(url, "#example1",options);

Preview

Thank you for reading, I hope you will benefit from it.

This article is transferred from: https://blog.csdn.net/superKM/article/details/81013304

Recommended tutorial: “HTML Tutorial”

The above is the detailed explanation of HTML implementation online Preview the details of the functions (with codes) of word, excel, pdf and other files. For more information, please pay attention to other related articles on 1024programmer.com!

This article is from the internet and does not represent1024programmerPosition, please indicate the source when reprinting:https://www.1024programmer.com/detailed-explanation-of-html-to-realize-the-function-of-online-preview-of-word-excel-pdf-and-other-files-with-code-2/

author: admin

Previous article
Next article

Leave a Reply

Your email address will not be published. Required fields are marked *

The latest and most comprehensive programming knowledge, all in 1024programmer.com

© 2023 1024programmer - Encyclopedia of Programming Field
Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

首页
微信
电话
搜索