html-dom-to-pdf

1.0.2 • Public • Published

html-dom-to-pdf

A library to convert HTML DOM element to PDF using javascript.

Install

npm i html-dom-to-pdf

Usage

import { HtmlToPdf } from 'html-dom-to-pdf';
 
let pdfConverter = new HtmlToPdf();
/* 
   call the convertToPdf method with the following parameters
    domElement - The DOM element which you wish to convert to PDF
    FileName(optional) - Must be a string
    PageSize(optional) - A4 is set as default
    Margin(optional) - Must be a number specified in points
*/
pdfConverter.convertToPdf(domElement, 'Document.pdf', 'A4', 20);

Readme

Keywords

Package Sidebar

Install

npm i html-dom-to-pdf

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

24.3 kB

Total Files

3

Last publish

Collaborators

  • omprakash95