# ghostscript-js

> Just a nodeJS wrapper for ghostscript

Latest version **1.1.11** (published 2022-04-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install ghostscript-js
pnpm add ghostscript-js
yarn add ghostscript-js
bun add ghostscript-js
```

## 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.1.11 |
| Published | 2022-04-05 |
| First published | 2016-02-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4.2.0 |
| Dependencies | 2 |
| Unpacked size | 147.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| GitHub stars | 12 |
| Author | Rémy MEJA |
| Maintainers | rmeja |

## Links

- npm: https://www.npmjs.com/package/ghostscript-js
- Repository: https://github.com/Inist-CNRS/ghostscript-js
- Homepage: https://github.com/Inist-CNRS/ghostscript-js#readme
- Issues: https://github.com/Inist-CNRS/ghostscript-js/issues
- npm.io page: https://npm.io/package/ghostscript-js

## Dependencies (2)

- [nan](https://npm.io/package/nan.md) ^2.15.0
- [cmake-js](https://npm.io/package/cmake-js.md) ^6.3.0

## Recent versions

- 1.1.11 (latest) — 2022-04-05
- 1.1.10 — 2022-03-03
- 1.1.8 — 2021-06-22
- 1.1.7 — 2021-05-17
- 1.1.6 — 2020-12-12
- 1.1.5 — 2020-09-16
- 1.1.4 — 2017-08-28
- 1.1.3 — 2017-08-28
- 1.0.3 — 2017-04-05
- 1.0.2 — 2017-04-05
- 1.0.1 — 2017-04-05
- 1.0.0 — 2017-04-05
- 0.5.1 — 2017-02-02
- 0.4.0 — 2017-01-24
- 0.3.1 — 2016-12-06
- … 9 more at https://npm.io/package/ghostscript-js/versions

## README

[![Build Status](https://travis-ci.org/Inist-CNRS/ghostscript-js.svg?branch=master)](https://travis-ci.org/Inist-CNRS/ghostscript-js)

![logo ghostscript-js](/ghostscript-js.png)

# ghostscript-js

Just a NodeJS addons for ghostscript

## Requirements
This version has been tested only on Ubuntu 16.04

**Debian/Ubuntu**
```shell
sudo apt-get install libgs-dev g++ cmake
```

## Install
```shell
npm install ghostscript-js
```

## Usage
```javascript
const gs = require('ghostscript-js')
gs.exec([
  '-q',
  '-dNOPAUSE',
  '-dBATCH',
  '-sDEVICE=tiff24nc',
  '-r300',
  '-sOutputFile=output-%03d.tiff',
  'input.pdf'
], (codeError) => {
  if (codeError) {
    // deal with the codeError
    ...
  } else {
    // Great ! No errors !
    ...
  }
});
```

For more information about GhostScript error messages : https://ghostscript.com/doc/current/API.htm#return_codes

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