Created
February 4, 2023 22:26
-
-
Save keflavich/72cfe496217585823eda3a827f2c98cd to your computer and use it in GitHub Desktop.
PDFA creation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# one-liner to convert PDF to PDFA using ghostscript to meet NSF PAR requirements | |
gs -dPDFA -dNOOUTERSAVE -dBATCH -dNOPAUSE -sProcessColorModel=DeviceRGB -dUseCIEColor -sColorConversionStrategy=UseDeviceIndependentColor -sDEVICE=pdfwrite -dPDFACompatibilityPolicy=1 -sOutputFile=${fn/.pdf/_PDFA.pdf} $fn | |
# loop to do that to all files in a directory | |
for fn in *.pdf; do if [[ $fn != *pdfa* ]]; then if [ ! -f ${fn/.pdf/_PDFA.pdf} ]; then echo $fn; gs -dPDFA -dNOOUTERSAVE -dBATCH -dNOPAUSE -sProcessColorModel=DeviceRGB -dUseCIEColor -sColorConversionStrategy=UseDeviceIndependentColor -sDEVICE=pdfwrite -dPDFACompatibilityPolicy=1 -sOutputFile=${fn/.pdf/_PDFA.pdf} $fn; fi; fi; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment