@palmabit/htmltopdfmake
v1.1.0
Published
Convert html to PdfMake schema
Downloads
11
Keywords
Readme
HtmlToPdfMake
Convert html to PdfMake schema
Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
Installing
npm i -S @palmabit/htmltopdfmake
Usage
const { pdfForElement } = require('@palmabit/htmltopdfmake')
const result = pdfForElement('<div><h1>header1</h1></div>')
//result
[
{ "stack": [
{ "text": [] },
{ "stack": [
{ "text": [
{ "text": "header1", "fontSize": 32, "bold": true }
]
}]
}
]
]
Built With
- Parse5 - HTML parsing/serialization toolset for Node.js. WHATWG HTML Living Standard (aka HTML5)-compliant.
Versioning
We use SemVer for versioning. For the versions available, see the tags on this repository.
License
This project is licensed under the MIT License - see the LICENSE.md file for details