4 ms·
I use the following tiny script to make PDFs look like they have been scanned. There are still entities that require you to physically sign a document and scan
by mo_42 4y ago
I use the following tiny script to make PDFs look like they have been scanned. There are still entities that require you to physically sign a document and scan it. So far, everyone accepted PDFs like these:
#!/bin/sh
ROTATION=$(shuf -n 1 -e '-' '')$(shuf -n 1 -e $(seq 0.05 .5))
convert -density 150 $1 \
-linear-stretch '1.5%x2%' \
-rotate ${ROTATION} \
-attenuate '0.01' \
+noise Multiplicative \
-colorspace 'gray' $2
- spaboleo 4y agoThis is awesome! It would be perfect if there an occasional artefact line crossing the entire page vertically could be added. You know, those lines caused by an old crusty ink jet print head. Also a visibly cast shadow by the allegedly scanned edge of the paper due to misalignment on the flat bed would add to the illusion.
- melagonster 4y agothis surprise me, I don't know pdf can work on this way haha.
- lloydatkinson 4y agoDo you have a before and after of a sample pdf? Sounds great. How do you use it? I don't see any PDF file paths?
- mo_42 4y agoThe first argument is the input file and the second one the output: ./script.sh original.pdf scanned.pdf
- kilroy123 4y agoSo awesome! Just tried and it worked great.