Skip to content
forked from ncb000gt/node-gs

NodeJS lib that wraps cli execution of gs (ghostscript).

Notifications You must be signed in to change notification settings

spreecode/node-gs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gs

Build Status

NodeJS wrapper for gs

Usage

    var gs = require('gs');

    gs(inputFile)
      .batch()
      .nopause()
      .output(outputFile)
      .exec(function(err, data) {
        console.log(data.toString());
      });

API

  • include - set path to gs_init.ps file (portable Ghostscript)
  • batch
  • nopause
  • device - device - defaults to txtwrite
  • output - file - defaults to - which represents stdout
  • input - file
  • exec - callback

Events

  • data (text)
  • page (currentPage)
  • pages (firstPage, lastPage)
    gs(inputFile)
      .output(outputFile)
      .on('page', function(page) { console.debug('processing page:', page); })
      .exec(function(err, data) {
        console.log(data.toString());
      });

License

MIT - http://ncb000gt.mit-license.org/

About

NodeJS lib that wraps cli execution of gs (ghostscript).

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 98.9%
  • Makefile 1.1%