Personal Page
sina-masnadi / lambda-ghostscript Goto Github PK
View Code? Open in Web Editor NEWGhostscript for Lambda
Ghostscript for Lambda
Personal Page
Thanks so much for this. Can you kindly provide the options passed to ./configure for building this? How might one use this to package an arbitrary version of gs.
Thanks
Hi! I'm having some issues with ghostscript 9.20 that have been corrected on 9.25 version. Do you have in mind updating this version? Or where can I find some documentation for doing the upgrade by my own?
Thanks!
hi,
great job... but how can i use this binari ?
i tried with https://github.com/sina-masnadi/node-gs
gs()
.batch()
.nopause()
.option('-r' + 50 * 2)
.option('-dDownScaleFactor=2')
.executablePath()
.device('png16m')
.output(tempNewPath)
.input(tempFilePath)
.exec( (err, stdout, stderr) =>{
if (!err) {
console.log('gs executed w/o error');
console.log('stdout', stdout);
console.log('stderr', stderr);
//resolve();
return true
} else {
console.log('gs error:', err);
//reject(err);
return false
}
});
but i have this error:
Error: spawn ../lambda-ghostscript/bin/gs ENOENT
at exports._errnoException (util.js:1020:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:197:32)
at onErrorNT (internal/child_process.js:376:16)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickDomainCallback (internal/process/next_tick.js:128:9)
I thought the problem was the gs module, so I tried calling the binary file directly with spawn
var path = require('path')
const { spawn } = require('child_process');
var opz = ["-dBATCH","-dNOPAUSE","-r100","-dDownScaleFactor=2","-sDEVICE=png16m","-sOutputFile=/tmp/1-Introduzione_2018.png","/dist/in.pdf"];
var nwDir = path.dirname(process.execPath);
var a = path.join(__dirname,"lambda-ghostscript","bin","gs")
spawn(a, opz).stdout.on("data", function(d) {
console.log(d);
});
BUT
Error: spawn c:\Users\Samir\Documents\GitHub\esempi\provaGs\lambda-ghostscript\bin\gs ENOENT
util.js:1024
at _errnoException (util.js:1024:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:192:19)
at onErrorNT (internal/child_process.js:374:16)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
at Function.Module.runMain (module.js:655:11)
at startup (bootstrap_node.js:187:16)
at bootstrap_node.js:608:3
what am I doing wrong?? thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.