# grunt-princess

> Grunt Task for running XML/HTML to PDF renderer PrinceXML

Latest version **1.0.16** (published 2022-06-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install grunt-princess
pnpm add grunt-princess
yarn add grunt-princess
bun add grunt-princess
```

## 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.16 |
| Published | 2022-06-16 |
| First published | 2014-09-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=14.0.0 |
| Dependencies | 2 |
| Unpacked size | 20.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Dr. Ralf S. Engelschall |
| Maintainers | rse |
| Keywords | gruntplugin, prince, xml, pdf |

## Links

- npm: https://www.npmjs.com/package/grunt-princess
- Repository: https://github.com/rse/grunt-princess
- Homepage: http://github.com/rse/grunt-princess
- Issues: http://github.com/rse/grunt-princess/issues
- npm.io page: https://npm.io/package/grunt-princess

## Dependencies (2)

- [chalk](https://npm.io/package/chalk.md) 4.1.2
- [prince](https://npm.io/package/prince.md) >=1.5.0

## 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.16 (latest) — 2022-06-16
- 1.0.15 — 2021-11-04
- 1.0.14 — 2021-01-09
- 1.0.13 — 2019-12-22
- 1.0.12 — 2019-06-16
- 1.0.11 — 2018-12-25
- 1.0.10 — 2018-06-23
- 1.0.9 — 2018-03-26
- 1.0.8 — 2017-12-20
- 1.0.7 — 2017-12-03
- 1.0.6 — 2016-12-06
- 1.0.5 — 2015-12-13
- 1.0.4 — 2015-07-28
- 1.0.3 — 2015-03-31
- 1.0.2 — 2015-01-31
- … 5 more at https://npm.io/package/grunt-princess/versions

## README

# Grunt-Princess

[Grunt](http://gruntjs.com/) Task for executing XML/HTML to
[PDF renderer [PrinceXML](http://www.princexml.com/) via
[Node-Prince](https://github.com/rse/node-prince) integration API.

<p/>
<img src="https://nodei.co/npm/grunt-princess.png?downloads=true&stars=true" alt=""/>

<p/>
<img src="https://david-dm.org/rse/grunt-princess.png" alt=""/>

## Getting Started

This plugin requires Grunt `~0.4.0`

If you haven't used [Grunt](http://gruntjs.com/)
before, be sure to check out the [Getting
Started](http://gruntjs.com/getting-started) guide, as it explains how
to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as
install and use Grunt plugins. Once you're familiar with that process,
you may install this plugin with this command:

```shell
npm install grunt-princess --save-dev
```

Once the plugin has been installed, it may be enabled inside your
Gruntfile with this line of JavaScript:

```js
grunt.loadNpmTasks("grunt-princess");
```

## Task Options

- `binary` (default `prince`): corresponds to node-prince API function `Prince#binary()`

- `prefix` (default ``): corresponds to node-prince API function `Prince#prefix()`

- `license` (default ``): corresponds to node-prince API function `Prince#license()`

- `timeout` (default `10000`): corresponds to node-prince API function `Prince#timeout()`

- `cwd` (default `.`): corresponds to node-prince API function `Prince#cwd()`

- `option` (default `{}`): each key/value entry corresponds to node-prince API function `Prince#option()`

## Task Calling

_Run this task with the `grunt princess` command._

Task targets, files and options may be specified according to the Grunt
[Configuring tasks](http://gruntjs.com/configuring-tasks) guide.

## Usage Example

Assuming we have the following build environment:

- `Gruntfile.js`:

```js
// [...]
grunt.initConfig({
    "princess": {
        options: {
            license: "license.dat"
        },
        "user-manual": {
            options: {
                option: {
                    media: "print"
                }
            },
            src: [ "user-manual.html" ],
            dest: "user-manual.pdf"
        },
        "dev-manual": {
            options: {
                option: {
                    verbose: true
                }
            },
            src: [ "dev-manual.html" ],
            dest: "dev-manual.pdf"
        }
    }
});
grunt.registerTask("manuals", [ "princess:user-manual", "princess:dev-manual" ]);
// [...]
```

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