Skip to content
This repository has been archived by the owner on Apr 8, 2024. It is now read-only.

Latest commit

 

History

History
64 lines (56 loc) · 1.51 KB

README.md

File metadata and controls

64 lines (56 loc) · 1.51 KB

Build Status bitHound Overall Score js-semistandard-style

ghostscript-js

Just a nodeJS wrapper for ghostscript

Usage

const Ghostscript = require('ghostscript-js')

const gs = new Ghostscript()

gs.batch()
  .nopause()
  .device()
  .resolution(150)
  .input('/path/to/file.pdf')
  .output('/path/to/file.tif')
  .exec()
  .then((sdtout) => {
    // Do something
  })
  .catch((error) => {
    // Do something
  })

API

  • batch
  • nopause
  • quiet
  • interpolate
  • ram - number - defaults to 30 MB
  • device - device - defaults to tiff24nc
  • resolution - number
  • firstPage - number
  • lastPage - number
  • AutoRotatePages - All, None, PageByPage
  • antiAliasColorImage
  • antiAliasGrayImage
  • antiAliasMonoImage
  • autoFilterColorImages
  • colorImageFilter
  • autoFilterGrayImages
  • grayImageFilter
  • downsampleColorImages
  • downsampleGrayImages
  • downsampleMonoImages
  • colorConversionStrategy
  • convertCMYKImagesToRGB
  • convertImagesToIndexed
  • UCRandBGInfo
  • preserveHalftoneInfo
  • preserveOPIComments
  • preserveOverprintSettings
  • output - file
  • input - file
  • exec - Promise (ES6)
  • compatibility - number
  • pdfsettings - string