logoalt Hacker News

wan888888yesterday at 7:59 PM2 repliesview on HN

I'm having a similar use case from time to time, I just use imagemagick

magick -density 150 input.pdf \ -colorspace Gray \ -virtual-pixel White -background White \ -rotate 0.7 +repage \ -attenuate 0.45 +noise Gaussian \ -blur 0x0.4 \ -brightness-contrast -5x12 \ -compress jpeg -quality 78 scanned.pdf


Replies

__mharrison__yesterday at 8:52 PM

I have something similar. Someone asked for a signed PDF. I digitally signed it and sent it to them. They said it has to be scanned. So I did some image magic fu to it to rotate it and make it look crappy. Then they accepted it.

show 1 reply
1a527dd5yesterday at 10:32 PM

Yeah I don't want to rain on OPs parade; but this is already a solved problem:

From my bookmarks (found on HN originally!)

https://gist.github.com/andyrbell/25c8632e15d17c83a54602f6ac...