Live data from Hacker News

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

github.com

21–30 of 71 posts

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

#22

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

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.

My goto technique: apply signature stamp. Flatten. Change blend mode to multiply. Convert page to image. Rotate image by 0.5 deg. Paste scanned page on tape. Flatten. Change blend mode of image to burn or multiply. Convert to image.

The only tell tale sign is that the text still has this aliasing like texture that doesn’t happen in real scanned pages.

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

#23

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.

I sometimes want to create PDFs that contain text (Python code) that is not selectable. I want my students to type it in, not copy and paste.

I don’t know whether this tool enables that, but the idea is in the neighbourhood of “make it look scanned”.

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

#24

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.

I sometimes want to create PDFs that contain text (Python code) that is not selectable. I want my students to type it in, not copy and paste. I don’t know whether this tool enables that, but the idea is in the neighbourhood of “make it look scanned”.

iOS will natively let you select the text, as it does ocr on ever image. Maybe Android does the same.

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

#25

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.

Yes. Fraud. It makes a document look like it existed in physical form. Imagine for example a purchase agreement for a house that was physically scanned. You could change the signature to a different name and then make it look like it was original.

I am not asserting the authors intent is to facilitate fraud or there isn’t any other practical use, but let’s not be naive and act like fraud isn’t a likely use.

Before you downvote at least respond with why you think my analysis is wrong.

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

#30

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

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

Post reply on HN