# pdf-template

> PDF templating with Mustache and PDF.js

Latest version **0.1.11** (published 2018-05-03) · MIT license · 0 weekly downloads

## Install

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

## 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.1.11 |
| Published | 2018-05-03 |
| First published | 2018-04-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 22.4 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | amimaro |
| Maintainers | amimaro |
| Keywords | pdf, template, mustache, file |

## Links

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

## Dependencies (4)

- [pdfkit](https://npm.io/package/pdfkit.md) ^0.8.3
- [mustache](https://npm.io/package/mustache.md) ^2.3.0
- [pdfjs-dist](https://npm.io/package/pdfjs-dist.md) ^2.0.489
- [svg-to-pdfkit](https://npm.io/package/svg-to-pdfkit.md) ^0.1.7

## 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.1.11 (latest) — 2018-05-03
- 0.1.10 — 2018-05-03
- 0.1.9 — 2018-04-29
- 0.1.8 — 2018-04-29
- 0.1.7 — 2018-04-20
- 0.1.6 — 2018-04-20
- 0.1.4 — 2018-04-20
- 0.1.3 — 2018-04-20
- 0.1.2 — 2018-04-19
- 0.1.1 — 2018-04-19

## README

# pdf-template [![Build Status](https://secure.travis-ci.org/amimaro/pdf-template.svg?branch=master)](https://travis-ci.org/amimaro/pdf-template) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard)

PDF templating with mustache.js

## Installation

```bash
npm install --save pdf-template
```

## Usage

```javascript
const pdfTemplate = require('pdf-template')

pdfTemplate({
  template: 'example.pdf',
  output: 'output.pdf',
  data: {
    name: 'John Doe',
    age: 26,
    email: 'johndoe@example.com',
    birthdate: '01/01/1990',
    projects: ['project1', 'project2', 'project3']
  }
}).then((res) => {
  console.log(res)
}).catch((err) => {
  console.error(err)
})

```

## Testing

```bash
npm run test
```

## License

MIT [LICENSE.md](LICENSE.md)

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin new-feature`)
5. Create new Pull Request

Crafted with <3 by [amimaro](https://github.com/amimaro)

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