You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

31 lines
635 B

#!/bin/sh
##
## pdfoutline -- outline a PDF document
## Copyright (c) 2020 Dr. Ralf S. Engelschall <rse@engelschall.com>
## Licensed under MIT license.
##
# determine parameters
if [ $# -ne 2 ]; then
echo "pdfoutline: USAGE: pdfoutline <input-pdf> <output-pdf>" 1>&2
exit 1
fi
input="$1"
output="$2"
# perform outlining with the help of Ghostscript
@l_prefix@/bin/gs \
-q \
-dbatch \
-dNOPAUSE \
-dNOCACHE \
-dQUIET \
-dBATCH \
-sDEVICE=pdfwrite \
-dSAFER \
-dCompatibilityLevel="1.5" \
-dPDFSETTINGS="/printer" \
-dNoOutputFonts \
-sOutputFile=$output \
-f $input