logoalt Hacker News

Show HN: Make PDFs look scanned (CLI or in the browser via WASM)

76 pointsby overflowyyesterday at 6:17 PM40 commentsview on HN

Comments

wan888888yesterday at 7:59 PM

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

show 2 replies
kccqzyyesterday at 9:11 PM

I just display the PDF on my monitor and use my phone to take a photo of it. Scanner apps are good at eliminating moire patterns while accentuating the dust on my monitor. It looks highly realistic.

mysterydipyesterday at 7:29 PM

I’m all for fun side projects, so don’t take this the wrong way. Does this have a practical use case? Like are people actually wanting to make their PDFs less legible? Usually I’m trying to do the opposite, clean up my scanned-in documents.

show 10 replies
janoelzeyesterday at 10:21 PM

But… does it look scanned? https://i.imgur.com/ENKZV7s.png

show 1 reply
carsonyeyesterday at 8:16 PM

Is there any good tool that does the opposite — turning scanned documents into clean PDFs? I’ve had that need recently.

echoangleyesterday at 7:38 PM

If you’re interested in another suggestion: maybe allow image output too since that seems to be one of the steps in your pipeline? Maybe for some people using the jpg or a png directly is better than the final pdf.

sublinearyesterday at 8:53 PM

In the example image, the edge gradient bevels give it away.

There might be extra stuff that can be done to remedy that with this tool, but I'm not sure I'd ever use this anyway.

show 1 reply
ashton314yesterday at 7:52 PM

This needs a flag to insert random blank pages

show 1 reply
Rajikshankyesterday at 10:43 PM

Great idea

costabroskyyesterday at 6:32 PM

Useful tool

blopp99yesterday at 6:22 PM

Niceee

colesantiagoyesterday at 8:35 PM

Thank you for making this a free tool.

There are too many PDF tools that are unnecessarily paywalled, or have a paid tier that don't make any sense.

We need more tools from paid ones that should be completely free and OSS.

show 1 reply
huflungdungyesterday at 10:16 PM

[dead]

booleandilemmayesterday at 10:14 PM

[dead]