mammoth+html2canvas实现浏览器中打开word文档预览下载为图片代码
代码语言:html
所属分类:其他
代码描述:mammoth+html2canvas实现浏览器中打开word文档预览下载为图片代码,mammoth解析word文档docx为html,html2canvas负责将html变成图片下载。
代码标签: mammoth html2canvas 浏览器 打开 word 文档 预览 下载 图片 代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<style>
.custom-file-upload{
margin: 100px;
}
.inputfile {
width: 0.1px;
height: 0.1px;
opacity: 0;
overflow: hidden;
position: absolute;
z-index: -1;
}
.custom-file-upload label {
display: inline-block;
padding: 10px 20px;
font-size: 1rem;
letter-spacing: 1px;
text-align: center;
cursor: pointer;
background-color: #f8f8f8;
border: 2px solid #d3d3d3;
border-radius: 4px;
}
.custom-file-upload label:hover {
.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0