Skip to content

Instantly share code, notes, and snippets.

@erineland
Created August 28, 2018 13:00
Show Gist options
  • Save erineland/2487f19eaa13cdb33ac9cfc6b5987c72 to your computer and use it in GitHub Desktop.
Save erineland/2487f19eaa13cdb33ac9cfc6b5987c72 to your computer and use it in GitHub Desktop.
[macOS] A Bash script to use the imagemagick library to make a PDF file look like it has been scanned!
#!/bin/bash
brew upgrade imagemagick
convert -density 200 $1 -rotate 0.3 +noise Multiplicative -format pdf -quality 85 -compress JPEG -colorspace gray $2
@erineland
Copy link
Author

To use (Only on MacOS):

  • Make the script executable via 'chmod +x made-pdf-look-scanned.sh'
  • Invoke the script passing in the input file pathname and the output file pathname
    • ./made-pdf-look-scanned.sh input.pdf output.pdf
  • Enjoy!

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