Live data from Hacker News

Show HN: Make Your PDF Look Scanned

scanyourpdf.com

41–50 of 177 posts

Re: Show HN: Make Your PDF Look Scanned

#41

Edit: fixed now. Original: Please don't upload any private or confidential pdfs right now. I emailed OP two security concerns that trivially allow anybody to see any of the converted pdfs.

It's still far short of being suitable for use of any private documents.

https://github.com/baicunko/scanyourpdf/blob/master/pdfwebsi...

This is rather less than secure; output files are named, e.g., "Scan_2020512_{four random lower-case letters}.pdf" into a web-server-readable directory.

That gives a total of 456976 different possible filenames on a day. It's more than feasible to brute-force that many filenames in the hour before files get deleted.

OP: I don't think randomly-suffixed file names are an inherently bad way to approach this. But you should definitely consider using a longer random string, and definitely consider not using the `random` module too (it is not secure and is not intended to be).

Re: Show HN: Make Your PDF Look Scanned

#43
I find that digital books are simply too perfect. There should be pdf fonts where there are maybe 10 incantations of each character, and the display:

1. picks one incantation randomly for each display 2. slightly and randomly alters the position/rotation of each character 3. adds a tiny blotch now and then

Like the print in a real book, especially ones printed before 1970.

I also suggest that the background be an actual scanned image of a blank piece of paper. Those "paper color" backgrounds are too perfect. Take some blank pages out of an older book sometime and scan them, and you'll see what I mean.

Re: Show HN: Make Your PDF Look Scanned

#44
post #2

I recently came across a couple of institutions which required me to print, sign and send back a couple of documents. COVID and all of that means I don't have a printer at home. I made this website by inspiration from other posts here and now it's free to use! Code is open source so feel free to comment any new ideas or things you would like includede!

it occurs to me that you could do this with a lower tech method, just sign your name on a piece of scotch tape and align the tape on the monitor over the document, take a photo with your phone and then use that as the 'scanned image' in the pdf file.

Taking a picture of a monitor with a will usually result in a Moire pattern[1] since the image sensors is a grid and the display pixels are grid.

Just tried this. Orienting your phone at 45 degrees to the monitor can mostly reduce them, but that's not really that useful.

[1]https://en.wikipedia.org/wiki/Moir%C3%A9_pattern

Re: Show HN: Make Your PDF Look Scanned

#45

I find that digital books are simply too perfect. There should be pdf fonts where there are maybe 10 incantations of each character, and the display: 1. picks one incantation randomly for each display 2. slightly and randomly alters the position/rotation of each character 3. adds a tiny blotch now and then Like the print in a real book, especially ones printed before 1970. I also suggest that the background be an act…

Most of the "book simulation" features I've seen (background textures, page turn animations, the like) have come across as gimmicky and useless, meanwhile digital books tend to still suffer from conceptually simple formatting problems like poor responsive text reflow or baking detailed vector figures into tiny JPEGs.

I'd settle for "too perfect" in a heartbeat.

Re: Show HN: Make Your PDF Look Scanned

#46

Edit: fixed now. Original: Please don't upload any private or confidential pdfs right now. I emailed OP two security concerns that trivially allow anybody to see any of the converted pdfs.

It's still far short of being suitable for use of any private documents. https://github.com/baicunko/scanyourpdf/blob/master/pdfwebsi... This is rather less than secure; output files are named, e.g., "Scan_2020512_{four random lower-case letters}.pdf" into a web-server-readable directory. That gives a total of 456976 different possible filenames on a day. It's more than feasible to brute-force that many filenames in…

Thank you for the comments. I agree with you, I will decrease how long the file is in the server (I just hit 40gb from hacker news) as well as implement rate limiting to prevent any brute force

Re: Show HN: Make Your PDF Look Scanned

#48

I find that digital books are simply too perfect. There should be pdf fonts where there are maybe 10 incantations of each character, and the display: 1. picks one incantation randomly for each display 2. slightly and randomly alters the position/rotation of each character 3. adds a tiny blotch now and then Like the print in a real book, especially ones printed before 1970. I also suggest that the background be an act…

Most of the "book simulation" features I've seen (background textures, page turn animations, the like) have come across as gimmicky and useless, meanwhile digital books tend to still suffer from conceptually simple formatting problems like poor responsive text reflow or baking detailed vector figures into tiny JPEGs. I'd settle for "too perfect" in a heartbeat.

I've sent many suggestions to the Kindle people of things they could improve on the Kindle, all of which were very simple to do. The years go by, they've done exactly 0 of them.

One of them, for example, was an option to eliminate the margin in a pdf display. The pdf already has a margin, so there's the pdf margin plus the margin the ereader puts around the pdf. This significantly reduces the number of pixels displaying information.

Re: Show HN: Make Your PDF Look Scanned

#49

I've extracted the oneliner command that runs this into a gist of a simple bash script. I don't want to send my PDFs to an unknown server. Also modified a bit (density and output compression) to reduce file size. https://gist.github.com/jduckles/29a7c5b0b8f91530af5ca3c22b8...

Great idea, I will probably include your gist in the original GitHub mentioning you
Post reply on HN