20 lines
415 B
Bash
20 lines
415 B
Bash
|
#!/bin/sh
|
||
|
|
||
|
# Set input and output file paths
|
||
|
INPUT_PDF="./uploads/${1}/in.pdf"
|
||
|
OUTPUT_PDF="./uploads/${1}/out.pdf"
|
||
|
|
||
|
# Ghostscript command
|
||
|
gs -sDEVICE=pdfwrite \
|
||
|
-dNOPAUSE \
|
||
|
-dBATCH \
|
||
|
-dSAFER \
|
||
|
-dCompatibilityLevel=1.4 \
|
||
|
-dPDFSETTINGS=/ebook \
|
||
|
-dConvertCMYKImagesToRGB=true \
|
||
|
-dEmbedAllFonts=true \
|
||
|
-dSubsetFonts=true \
|
||
|
-dFastWebView=true \
|
||
|
-sOutputFile="$OUTPUT_PDF" \
|
||
|
"$INPUT_PDF"
|