Skip to content

Instantly share code, notes, and snippets.

@melekhine
Created February 14, 2020 16:17
Show Gist options
  • Save melekhine/d96fda300ef04e7bdb1e31b687cfa987 to your computer and use it in GitHub Desktop.
Save melekhine/d96fda300ef04e7bdb1e31b687cfa987 to your computer and use it in GitHub Desktop.
OSX PDF operations

Merge pdf by Quartz

/System/Library/Automator/Combine\ PDF\ Pages.action/Contents/Resources/join.py --output all.pdf *.pdf

Compress PDF via GostScript

gs -q -dNOPAUSE -dBATCH -dSAFER -dPDFA=2 -dPDFACompatibilityPolicy=1 -dSimulateOverprint=true -sDEVICE=pdfwrite -dCompatibilityLevel=1.3 -dPDFSETTINGS=/screen -dEmbedAllFonts=true -dSubsetFonts=true -dAutoRotatePages=/None -dColorImageDownsampleType=/Bicubic -dColorImageResolution=150 -dGrayImageDownsampleType=/Bicubic -dGrayImageResolution=150 -dMonoImageDownsampleType=/Bicubic -dMonoImageResolution=15 -sOutputFile=./output.pdf ./input.pdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment