# pdf-maker

> easy pdf generation using phantom.js

Latest version **0.0.2** (published 2017-03-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install pdf-maker
pnpm add pdf-maker
yarn add pdf-maker
bun add pdf-maker
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2017-03-23 |
| First published | 2017-03-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 4 |
| Author | dipesh |
| Maintainers | dipesh.singh |
| Keywords | node, node.js, javascript, npm, pdf, pdf-maker, phantom, phantom.js |

## Links

- npm: https://www.npmjs.com/package/pdf-maker
- Repository: https://github.com/10uei011/pdf-maker
- Homepage: https://github.com/10uei011/pdf-maker#readme
- Issues: https://github.com/10uei011/pdf-maker/issues
- npm.io page: https://npm.io/package/pdf-maker

## Dependencies (4)

- [ejs](https://npm.io/package/ejs.md) ^2.5.6
- [lodash](https://npm.io/package/lodash.md) ^4.17.4
- [phantomjs](https://npm.io/package/phantomjs.md) ^2.1.7
- [node-phantom-simple](https://npm.io/package/node-phantom-simple.md) ^2.2.4

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

- 0.0.2 (latest) — 2017-03-23
- 0.0.1 — 2017-03-22

## README

# pdf-maker
An easy way to generate pdf files from ejs templates or html files


##Install

```js
npm i --save pdf-maker
```

##Usage

##For generating pdf from ejs templates

```js
var pdfMaker = require('pdf-maker');

var template = 'path/to/ejsTemplate.ejs';
var data = {
    name: 'node.js'
};
var pdfPath = '/path/of/pdf/file.pdf';
var option = {
    {
        paperSize: {
            format: 'A4',
            orientation: 'portrait',
            border: '1.8cm'
        }
    };
};

pdfMaker(template, data, pdfPath, option);
```

Here, 'option' parameter is optional.
'data' is the data which will be used in the ejs template.
'pdfPath' is the path with where the pdf file will be saved.


##For generating pdf from html files.

```js
var pdfMaker = require('pdf-maker');

var template = 'path/to/htmlFile.html';
var pdfPath = '/path/of/pdf/file.pdf';
var option = {
    {
        paperSize: {
            format: 'A4',
            orientation: 'portrait',
            border: '1.8cm'
        }
    };
};

pdfMaker(template, pdfPath, option);
```

##Roadmap

Adding test cases.
Removing external dependencies.

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