# html-dom-to-pdf

> Converts DOM Element to PDF document using Javascript

Latest version **1.0.2** (published 2019-03-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install html-dom-to-pdf
pnpm add html-dom-to-pdf
yarn add html-dom-to-pdf
bun add html-dom-to-pdf
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2019-03-04 |
| First published | 2019-03-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 23.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | omprakash95 |
| Keywords | pdf, html-DOM, converter |

## Links

- npm: https://www.npmjs.com/package/html-dom-to-pdf
- npm.io page: https://npm.io/package/html-dom-to-pdf

## Alternatives

- [@cantoo/pdf-lib](https://npm.io/package/@cantoo/pdf-lib.md) — 297.9K weekly downloads
- [datatables.net-buttons](https://npm.io/package/datatables.net-buttons.md) — 200.1K weekly downloads
- [@ckeditor/ckeditor5-export-pdf](https://npm.io/package/@ckeditor/ckeditor5-export-pdf.md) — 167.0K weekly downloads
- [scanbot-web-sdk](https://npm.io/package/scanbot-web-sdk.md) — 15.0K weekly downloads
- [@syncfusion/ej2-angular-pdfviewer](https://npm.io/package/@syncfusion/ej2-angular-pdfviewer.md) — 8.8K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2019-03-04
- 1.0.1 — 2019-03-04
- 1.0.0 — 2019-03-04

## README

#html-dom-to-pdf

A library to convert HTML DOM element to PDF using javascript.

##Install
```
npm i html-dom-to-pdf
```

---

##Usage
 ```javascript
 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);
 ```

---
_Source: https://npm.io/package/html-dom-to-pdf · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
