ncb000gt/node-gs — pull request #1 by ecarter (2012-12-02 21:02:43+00:00)
Title: support for definitions and device resolutions

Awesome lib :beers: happy to of found it.

Needed a little more control for highres PDF conversion.

Couple of examples:

**define(key, value)** - defines a definition

```
gs()
.batch()
.output()
.define('TextAlphaBits, 4) // -dTextAlphaBits=4
.define('GraphicsAlphaBits', 4) // -dGraphicsAlphaBits=4
.define('DownScaleFactor', 3) // -dDownScaleFactor=3
.exec(function(err, data) {
console.log(data.toString());
});
```

**res(xres, yres)** - sets device resolution

```
gs()
.res(300, 72) // -r300x72
.batch()
.output()
.exec(function(err, data) {
console.log(data.toString());
});
```

_Added some basic tests for both as well._

---

Big thanks for putting **node-gs** together, much needed :ghost: ghostscript api for node.js :rocket: _(only one found on npm)_