Skip to content

Instantly share code, notes, and snippets.

View jersobh's full-sized avatar
💀

Jeff Andrade jersobh

💀
View GitHub Profile
@jersobh
jersobh / simulate_scanned_PDF.md
Created October 16, 2020 01:34 — forked from scf37/simulate_scanned_PDF.md
Simulate a scanned PDF with ImageMagick

Simulate a scanned PDF with ImageMagick

  1. Download and install Ghostscript and ImageMagick + Convert Module
  2. Execute the following command in the console (change the filename)
$ convert -density 200 INPUT.pdf -rotate 0.3 +noise Multiplicative -format pdf  -quality 85 -compress JPEG -colorspace gray OUTPUT.pdf

Description of the options

  • -density: set the input DPI to 200
  • -rotate: set Page rotation to 0.3 degrees