Code Monkey home page Code Monkey logo

html2pdf_word's Introduction

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)

Future work🌈

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

html2pdf_word's People

Contributors

yldjack avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.