SpeedyF/sh/monochrome.sh

21 lines
458 B
Bash
Raw Normal View History

2024-05-01 13:39:29 +01:00
#!/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 \
2024-05-01 14:41:08 +01:00
-dColorConversionStrategy=/DeviceGray \
2024-05-01 13:39:29 +01:00
-dEmbedAllFonts=true \
-dSubsetFonts=true \
-dFastWebView=true \
-sOutputFile="$OUTPUT_PDF" \
"$INPUT_PDF"