https://github.com/inist-cnrs/ghostscript-js
Just a nodeJS wrapper for ghostscript
https://github.com/inist-cnrs/ghostscript-js
ghostscript nodejs
Last synced: 5 months ago
JSON representation
Just a nodeJS wrapper for ghostscript
- Host: GitHub
- URL: https://github.com/inist-cnrs/ghostscript-js
- Owner: Inist-CNRS
- License: mit
- Created: 2016-02-24T13:58:25.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2023-07-12T07:32:47.000Z (over 2 years ago)
- Last Synced: 2025-08-31T08:38:01.412Z (5 months ago)
- Topics: ghostscript, nodejs
- Language: CMake
- Homepage:
- Size: 98.9 MB
- Stars: 12
- Watchers: 2
- Forks: 6
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://travis-ci.org/Inist-CNRS/ghostscript-js)

# 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