Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/realign/html-dom-pdf

🔨 ⚙️ A javascript tool of transform html-dom to pdf, support paging Lossless.
https://github.com/realign/html-dom-pdf

dom-pdf dom2pdf dompdf html-pdf html2pdf htmlpdf lossless paging-lossless pdf

Last synced: about 2 months ago
JSON representation

🔨 ⚙️ A javascript tool of transform html-dom to pdf, support paging Lossless.

Awesome Lists containing this project

README

        

# html-dom-pdf

[![NPM version][npm-image]][npm-url]

[npm-image]: https://img.shields.io/npm/v/html-dom-pdf.svg?longCache=true&style=for-the-badge
[npm-url]: https://www.npmjs.com/package/html-dom-pdf

> A javascript tool of transform html-dom-pdf-dom to pdf, support paging Lossless.

## Usage

### install

```bash
# install
$ npm html-dom-pdf -S
```

### project

```js
import HtmlDomPdf from 'html-dom-pdf';

new HtmlDomPdf(options).then(() => {
// do something.
});

const options = {}; // 👇
```

| Object | Prop | Type | Default | Note |
| ------- | ----------- | ------ | ------- | ----------------- |
| options. | selector | String | '' | [🔗 CSS Selectors](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors) |
| | title | String | 'pdf' | filename of pdf |
| | marginTB | Number | 0 | margin of `top` & `bottom` |
| | marginLR | Number | 0 | margin of `left` & `right` |
| | offsetLimit | Number | 40 |

Maximum offset: Get effective content when paging, trying to intercept upwards, this is the `maximum offset`
|

## Releases

* 2019-08-19
* 0.0.1