# nota

> A modern document engine (renders stand-alone HTML and PDF)

Latest version **2.1.0** (published 2015-11-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install nota
pnpm add nota
yarn add nota
bun add nota
```

## Health

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

Positive: no vulnerabilities.

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

Negative: insecure dependencies; abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.0 |
| Published | 2015-11-21 |
| First published | 2015-11-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 15 |
| Known vulnerabilities | 0 (+6 in 4 direct dependencies) |
| Install scripts | yes |
| GitHub stars | 13 |
| Maintainers | felixakk |
| Keywords | PDF, HTML, generator, automation, programmable, script, document, writing, render, capture |

## Links

- npm: https://www.npmjs.com/package/nota
- Repository: https://github.com/aerix-nl/nota
- Issues: https://github.com/aerix-nl/nota/issues
- npm.io page: https://npm.io/package/nota

## Dependencies (15)

- [q](https://npm.io/package/q.md) ~1.0.1
- [tmp](https://npm.io/package/tmp.md) github:raszi/node-tmp
- [bower](https://npm.io/package/bower.md) 1.3.12
- [chalk](https://npm.io/package/chalk.md) ^1.0.0
- [mkdirp](https://npm.io/package/mkdirp.md) ^0.5.0
- [cheerio](https://npm.io/package/cheerio.md) ^0.19.0
- [express](https://npm.io/package/express.md) 4.8.5
- [inliner](https://npm.io/package/inliner.md) ^1.4.0
- [phantom](https://npm.io/package/phantom.md) ^0.7.2
- [backbone](https://npm.io/package/backbone.md) ~1.1.2
- [externalip](https://npm.io/package/externalip.md) ^1.0.0
- [handlebars](https://npm.io/package/handlebars.md) ^4.0.4
- [underscore](https://npm.io/package/underscore.md) 1.6.0
- [body-parser](https://npm.io/package/body-parser.md) ^1.12.3
- [underscore.string](https://npm.io/package/underscore.string.md) 3.0.2

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

- 2.1.0 (latest) — 2015-11-21

## README

# Nota
<img src="https://dl.dropboxusercontent.com/u/5121848/Nota_demo.png">

Nota hosts your HTML based template, allows you to render in your data and
excretes pretty documents. Stand-alone HTML, recommended for digital transfer,
or PDF, recommended for print (analog transfer). Perfect for automating things
like bulk invoice or ticket generation.

## Usage
There are several ways to interface with Nota.

#### CLI
Use [Nota CLI](https://github.com/aerix-nl/nota-cli) package to call Nota
using your shell. Currently supports single jobs only. See there readme on the
repository for usage options.

#### API
For batch rendering, directly interface with Nota in Node.js. Call queue with
an array of [job](https://github.com/aerix-nl/nota) objects:

```javascript
var nota = require('nota');
nota.setTemplate(template);
nota.queue([job1, job2, job3]);
```

Where a template looks like:
```javascript
template = {
  path: 'path/to/template-dir'
}
```

And a job object looks like:
```javascript
job = {
  // hash containing data for your template model
  data: {},
  // alternatively provide a path
  dataPath: 'path/to/data.json',
  // Optional. Can also extend with filename to fix output or if template doesn't specify one
  outputPath: 'path/to/output/dir',
  // if you don't want to overwrite an existing file if output get's same name
  preserve: true,
  // buildTarget: 'pdf' // or 'html' (alternatively your template can specify per job)

}
```

#### Web interface & REST API
To create your PDF's though a friendly UI where you can upload a JSON file and
get a PDF in return, try the webinterface. Or use the REST API to expose Nota
over the interwebs, LAN or secure VPN. Send a POST request with JSON, and get
a PDF download in return. Run [Nota CLI](https://github.com/aerix-nl/nota-cli)
with the `--listen` flag. For example, try in your shell:

```bash
nota --template=example-invoice --listen
```

## Prerequisites

You will need the following things properly installed on your computer.

* [Git](http://git-scm.com/)
* [Node.js](http://nodejs.org/) (with NPM)
* [Bower](http://bower.io/)
* [PhantomJS v1.9.8](http://phantomjs.org/)

## Setup
Due to some shortcomings (see [Known problems](https://github.com/FelixAkk/nota#known-problems))
in the depencencies that are still being worked out, Nota is a bit
picky on it's environment and dependencies. We recommend running Nota under
Linux.

## [Wiki](https://github.com/aerix-nl/nota/wiki)
Check out the wiki for documentation on the API, architecture, examples, how
to's, known problems, scability etc.

## Meta

#### Developers
Nota was originally comissioned by [Aerix](https://www.aerix.nl) to automate
the task of invoice generations after alternatives like LaTex or MS Office
proved insufficient in the flexibility and easy of producing neatly designed
documents through a programmable interfaces.

Shortly after [inventid](https://www.inventid.nl) joined in on development
after it adopted Nota for automating the generation of event tickets.

Both Aerix and inventid are two young Dutch internetbureaus who are
passionate about making shiny apps and contributing to open source innovation.

#### How to suggest improvements?
We are still actively developing Nota for our internal use, but we would
already love to hear your feedback. In case you have some great ideas, you may
just [open an issue](https://github.com/inventid/nota/issues/new). Be sure to
check beforehand whether the same issue does not already exist.

#### How can I contribute?
We feel contributions from the community are extremely worthwhile. If you use
Nota in production and make some modification, please share it back to the
community. You can simply [fork the
repository](https://github.com/inventid/nota/fork), commit your changes to
your code and create a pull request back to this repository.

#### Collaborators
We would like to thank the developers which contributed to Nota, both big and
small.

- [FelixAkk](https://github.com/FelixAkk) (Original developer of Nota,
  developer @ [Aerix](https://www.aerix.nl))
- [joostverdoorn](https://github.com/joostverdoorn) (Developer @
  [inventid](https://www.inventid.nl))
- [rogierslag](https://github.com/rogierslag) (Developer @
  [inventid](https://www.inventid.nl))

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