HTML 显示 PDF 文件的几种方式
HTML PDF About 831 wordsobject 标签
data
属性中配置PDF
文件路径,type
选择application/pdf
。
<html>
<head>
<title>Object PDF</title>
</head>
<body>
<object data="https://www.mahailushu.com/pdfjs/web/mine.pdf" type="application/pdf" width=1000 height=800></object>
</body>
</html>
embed 标签
<html>
<head>
<title>Embed PDF</title>
</head>
<body>
<embed src="https://www.mahailushu.com/pdfjs/web/mine.pdf" type="application/pdf" width=1000 height=800>
</body>
</html>
iframe 标签
<html>
<head>
<title>Object PDF</title>
</head>
<body>
<iframe src="https://www.mahailushu.com/pdfjs/web/mine.pdf" width=1000 height=800></iframe>
</body>
</html>
其他方式
pdf.js
开源方法。
Views: 1,686 · Posted: 2023-09-19
————        END        ————
Give me a Star, Thanks:)
https://github.com/fendoudebb/LiteNote扫描下方二维码关注公众号和小程序↓↓↓
Loading...