-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Empty output with when using pdfwrite #30
Comments
I have the same error. |
Hi @GautierT and @letalumil, |
Hi @letalumil and @GautierT , const gs = require('ghostscript4js')
let cmd = '-psconv -q -dNOPAUSE -sDEVICE=pdfwrite -o out.pdf -f in.ps'
try {
gs.executeSync(cmd)
} catch (err) {
console.log('Error => ', err)
} It worked for me, please try it and send me feedback. |
Hi @NickNaso, Thank you for the quick help! |
Works for me too
|
Hi @letalumil and @letalumil , |
@NickNaso so it appears that switch -sOutputFile doesn't work with ghostscript4js. At least I don't see an output although stdout appears to iterate the pages. That said the above examples did output the file. Is my description accurate or is there something I'm missing. Also would would be the suggestion as to monitoring progress. Say percentage of completion. Maybe getting page count first then counting the ticks (each page) or something? Speaking to compression or any process which iterates each page. |
Hello! Thanks for the great package, it looks promising, but something doesn't work well in my case.
I'm trying to convert a PostScript file to PDF via the following command:
-sDEVICE=pdfwrite -o out.pdf -f in.ps
. So, nothing fancy, all params are the default.If I execute it in shell directly this way:
gs -sDEVICE=pdfwrite -o out.pdf -f in.ps
, then everything works well and theout.pdf
is placed next to thein.ps
.But when I try to use the very same command with
ghostscript4js
, then I get no PDF file and no error.Here is the code I use:
And here is the console output:
I tried the sample code with the PNG file from the readme and it works well. It seems to be something specific with the pdfwrite. If you have any suggestions I'd much appreciate it! Thanks!
Here is some info about my environment:
OS: macOS 10.12.6
Node: v8.4.0 (I also tried with node v6)
Ghostscript: 9.21
Sample PostScript file I used: link (I also tried a bunch of other ps files, but no luck)
The text was updated successfully, but these errors were encountered: