Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@schtobia
Last active June 5, 2020 12:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save schtobia/147d0c42aa56251c15cdae47816b3776 to your computer and use it in GitHub Desktop.
Save schtobia/147d0c42aa56251c15cdae47816b3776 to your computer and use it in GitHub Desktop.
Merge PDFs with images in 300dpi
#! /bin/sh
[ "$#" -lt 2 ] && { echo "Usage: $0 <outputfile> <inputfile> ..."; exit 1; }
output_file="$1"
shift
gs -dBATCH -dNOPAUSE -dPDFSETTINGS=/prepress -sDEVICE=pdfwrite -o "$output_file" $@
[ /Title (Title)
% /Author (Vorname Nachname)
% /Subject (Subject description)
% /Keywords (comma, separated, keywords)
% All dates are in UTC!
% /ModDate (D:20181231235959)
% /CreationDate (D:20181231235959)
% /Creator (application name or creator note)
% /Producer (PDF producer name or note)
/DOCINFO pdfmark
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment