@palmabit/htmltopdfmake

1.1.0 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i @palmabit/htmltopdfmake

Weekly Downloads

15

Version

1.1.0

License

ISC

Unpacked Size

16.1 kB

Total Files

7

Last publish

Collaborators

  • palmabit-dev
  • a.sarzina
  • francesco
  • drubetti