-
-
Save fieri/02d40eaaa733976a2d53f18bea5033c0 to your computer and use it in GitHub Desktop.
Simulate a scanned PDF with ImageMagick
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| convert -density 300 INPUT-FILENAME -resample 200 +noise Multiplicative -quality 85 -compose divide -linear-stretch 5%x0% -rotate 0.3 -compress jpeg OUTPUT-FILENAME | |
| :: -density set the input DPI to 300 | |
| :: -resample set the output DPI to 200 | |
| :: +noise add noise to the PDF (other Noise-Options: https://www.imagemagick.org/script/command-line-options.php#noise) | |
| :: -quality set JPEG Quality to 85% | |
| :: -compose set the type of image composition (other Compose-Options: https://www.imagemagick.org/script/command-line-options.php#compose) | |
| :: -linear-stretch (https://www.imagemagick.org/script/command-line-options.php#linear-stretch) | |
| :: -rotate set Page rotation to 0.3 degrees | |
| :: -compress set compress to jpeg (other Compress-Options: https://www.imagemagick.org/script/command-line-options.php#compress) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment