@privyid/ghostscript
Ghostscript compiled to WebAssembly
[!NOTE]
This is low-level WebAssembly library which part of @privyid/ghoulscript.
This use GS version 10.03.1
Installation
yarn add @privyid/ghostscript
How to Use
import Module from '@privyid/ghostscript'
const mod = await Module()
const working = '/working'
mod.FS.mkdir(working)
mod.FS.mount(mod.NODEFS, { root: _dirname }, working)
mod.FS.chdir(working)
await callMain([
'-q',
'-dSAFER',
'-dBATCH',
'-dNOPAUSE',
'-sDEVICE=png16m',
'-dGraphicsAlphaBits=4',
'-sOutputFile=out/sammple.png',
'sample.pdf',
])
Development
Special Thank ❤️
@jsscheller - for build script.
License
AGPL-3.0