fix: disable -dSAFER flag in Ghostscript commands to ensure proper PDF processing
Build and Push Multi-Platform Images / build-and-push (push) Successful in 28s
Build and Push Multi-Platform Images / build-and-push (push) Successful in 28s
This commit is contained in:
@@ -22,7 +22,7 @@ export class PdfService {
|
|||||||
await execFileAsync('gs', [
|
await execFileAsync('gs', [
|
||||||
'-dNOPAUSE',
|
'-dNOPAUSE',
|
||||||
'-dBATCH',
|
'-dBATCH',
|
||||||
'-dSAFER',
|
'-dNOSAFER',
|
||||||
'-sDEVICE=png16m',
|
'-sDEVICE=png16m',
|
||||||
`-dFirstPage=${page}`,
|
`-dFirstPage=${page}`,
|
||||||
`-dLastPage=${page}`,
|
`-dLastPage=${page}`,
|
||||||
@@ -45,7 +45,7 @@ export class PdfService {
|
|||||||
await execFileAsync('gs', [
|
await execFileAsync('gs', [
|
||||||
'-dNOPAUSE',
|
'-dNOPAUSE',
|
||||||
'-dBATCH',
|
'-dBATCH',
|
||||||
'-dSAFER',
|
'-dNOSAFER',
|
||||||
'-sDEVICE=png16m',
|
'-sDEVICE=png16m',
|
||||||
`-r${dpi}`,
|
`-r${dpi}`,
|
||||||
`-sOutputFile=${path.join(tmpDir, 'page-%d.png')}`,
|
`-sOutputFile=${path.join(tmpDir, 'page-%d.png')}`,
|
||||||
@@ -94,7 +94,7 @@ export class PdfService {
|
|||||||
await execFileAsync('gs', [
|
await execFileAsync('gs', [
|
||||||
'-dNOPAUSE',
|
'-dNOPAUSE',
|
||||||
'-dBATCH',
|
'-dBATCH',
|
||||||
'-dSAFER',
|
'-dNOSAFER',
|
||||||
'-sDEVICE=pdfwrite',
|
'-sDEVICE=pdfwrite',
|
||||||
`-sOutputFile=${outputPath}`,
|
`-sOutputFile=${outputPath}`,
|
||||||
inputPath,
|
inputPath,
|
||||||
|
|||||||
Reference in New Issue
Block a user