Hacker News new | past | comments | ask | show | jobs | submit login

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



This 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.


Do 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?


The first argument is the input file and the second one the output:

  ./script.sh original.pdf scanned.pdf


So awesome! Just tried and it worked great.


this surprise me, I don't know pdf can work on this way haha.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: