1.0.2 • Published 5 years ago

html-dom-to-pdf v1.0.2

Weekly downloads
11
License
MIT
Repository
-
Last release
5 years ago

#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);