【文件属性】:
文件名称:vivliostyle-print::printer:使用Vivliostyle进行打印
文件大小:24KB
文件格式:ZIP
更新时间:2021-04-07 16:08:17
vivliostyle JavaScript
活字印刷
允许使用vivliostyle进行页面布局以在网站内进行打印而不会破坏原始布局
如何使用?
在基于浏览器JavaScript项目中安装vivliostyle-print,如下所示:
npm install @vivliostyle/print --save
像这样在项目中使用它:
import { printHTML } from '@vivliostyle/print'
const htmlDoc = `<!doctype html>
<html>
<head>
<style>
... Add your CSS code here ...
</style>
</head>
<body>
... Add your HTML code here ...
</body>
</html
【文件预览】:
vivliostyle-print-master
----.gitignore(91B)
----README.md(2KB)
----.github()
--------FUNDING.yml(725B)
----rollup.config.js(2KB)
----LICENSE(34KB)
----package.json(2KB)
----CONTRIBUTING.md(125B)
----src()
--------index.js(44B)
----rollup.demo.config.js(967B)
----.editorconfig(54B)
----.eslintrc.js(9KB)
----demo()
--------index.js(1013B)
--------index.html(10KB)