Mergepdf function that I can't actually use

This commit is contained in:
Marley Rae 2024-01-29 21:31:09 -08:00
parent ae3d0197e6
commit e86bc7ca88

View file

@ -0,0 +1,24 @@
#!/usr/bin/env fish
function mergepdf -d "Merge PDF files, preserving hyperlinks"
argparge 'h/help' -- $argv
if set -q _flag_h
printf '%b' \
"Merge PDF files, preserving hyperlinks.\n" \
"\n" \
"Usage: mergepdf [-h|--help] [input.pdf ...]\n" \
"\n" \
"Options:\n" \
"-h|--help: Show this message.\n"
return
end
if [ "$(uname)" != "Darwin" ]
echo "Sorry, this script is only for macOS!"
return
end
gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=_merged.pdf $argv
end