-
Notifications
You must be signed in to change notification settings - Fork 15
/
pdfa.sh
executable file
·25 lines (24 loc) · 940 Bytes
/
pdfa.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash
# Use this script to convert random PDFs to PDF/A (e.g. figures).
# Unfortunately, ghostscript cannot retain the PDF/A metadata. In result, if
# you use this on the thesis, it _will_ become PDF/A compliant (and SIS will
# accept it), but won't contain the magic PDF/A "stamp" and will show only as
# normal PDF-1.4. :(
gs -dPDFA=1 \
-dBATCH \
-dNOPAUSE \
-sProcessColorModel=DeviceCMYK \
-sColorConversionStrategy=UseDeviceIndependentColor \
-sDEVICE=pdfwrite \
-dPDFACompatibilityPolicy=3 \
-sOutputFile="pdfa-$1" \
"$1"
# Notes:
#
# PDFACompatibilityPolicy=3 actually doesn't exist. A bug in ghostscript
# interprets it as something between 1 and 2, without unnecessarily failing on
# various dumb errors.
#
# Add -dNoOutputFonts if you absolutely totally need to get rid of fonts in a
# figure PDF. Do not do that for the whole thesis though-- a thesis with
# removed font glyphs is not submittable!