logoalt Hacker News

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

135 pointsby overflowyyesterday at 6:17 PM58 commentsview on HN

I made this because the online "make my PDF look scanned" tools want you to upload your file to their servers, which feels sketchy at best. Also, I wasn't happy with the output they produce, I wanted something that looks realistic.


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

svl7today at 6:13 AM

Reminds me of this: https://github.com/erstazi/falsisign

Adds your signature and makes it look scanned. Previously discussed on HN. Came in handy once in a while.

recroadtoday at 2:04 AM

This has been working for me

https://lookscanned.io/en/scan

show 1 reply
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.

janoelzeyesterday at 10:21 PM

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

show 1 reply
Phoenixhqtoday at 3:21 AM

It's pretty good, but there seem to be some similar products on the market that can convert locally without uploading.

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
hk1337today at 1:36 AM

Basically, you’re converting it to an image-based PDF so they cannot just scrape the text off of it but would have to use OCR?

Cbagenaltoday at 1:13 AM

cool idea, looks sooo realistic

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]

Rajikshankyesterday at 10:43 PM

Great idea