Closed daton89 closed 5 years ago
Hi @daton89, you need to remove the quotation marks from the path of the pdf file and use one of the command reported in the example below:
'use strict'
const gs = require('ghostscript4js')
try {
// Command as a string
gs.executeSync('-dBATCH -dNOPAUSE -dSAFER -sDEVICE=tiffsep -dFirstPage=1 -dLastPage=1 -r144 -sOutputFile=output.tif ./input.pdf')
// Command as array of parameters
gs.executeSync(['-dBATCH', '-dNOPAUSE', '-dSAFER', '-sDEVICE=tiffsep' ,'-dFirstPage=1', '-dLastPage=1', '-r144', '-sOutputFile=output.tif', './input.pdf'])
} catch (err) {
// Handle error
throw err
}
I think that this should solve your problem. Keep me updated about this.
Hi @NickNaso,
unfortunately it doesn't work.
Thanks
Hi @NickNaso
thank you for this awesome work, it is really useful, but i had a problem that i guess is a bug.
When I try to use the tiffsep sDevice option some of the layers that are spot color are generated completely black.
I don't know the cause but if I try to run the same command in the shell it works.