html2pdf_word
TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

html2pdf_word v1.0.4 GitHub license

Uasge✨

Covert Html to PDF or Word File

Install 📦

npm install html2pdf_word -s

Arguments🔨

参数名(按顺序排列) 说明 类型 是否必填 默认值
domId 需转换的DOM的Id或className(开头带有'#'或'.') string
fileName 转换后的文件名 string
fileType 转换后文件类型('PDF'|'Word') string 'PDF'
title 转换后的文件中的标题 string
subTitle 转换后的文件中的副标题 string
font 转换后的文件的标题字体(目前‘黑体’|‘楷体’) string ‘黑体’

Examples📐

1.Import function from package

        import htmlToPDForWord from 'html2pdf_word'

2.Use it

          htmlToPDForWord('.chart-boxs','文件名','PDF','标题','副标题','楷体');

![PDF (1)](D:\DTStack\dtcat\html2pdf_word\PDF (1).gif)

Future work🌈

  • 1、添加更多的可选字体
  • 2、可自由调整标题和副标题大小
  • 3、可自由调整文字居中位置
  • 4、优化项目结构和体积

Readme

Keywords

none

Package Sidebar

Install

npm i html2pdf_word

Weekly Downloads

0

Version

1.0.5

License

ISC

Unpacked Size

40.1 MB

Total Files

12

Last publish

Collaborators

  • yldj