from Hacker News

Show HN: Make Your PDF Look Scanned

by baicunko on 5/12/20, 6:04 PM with 168 comments

  • by jmwilson on 5/12/20, 9:51 PM

    From the github repo, the site is a wrapper around exactly two shell commands. Instead of uploading your data to an untrusted site, you can run from the comfort and safety of your local computer:

      convert -density 150 input.pdf -colorspace gray -linear-stretch 3.5%x10% -blur 0x0.5 -attenuate 0.25 +noise Gaussian -rotate 0.5 temp.pdf
      gs -dSAFER -dBATCH -dNOPAUSE -dNOCACHE -sDEVICE=pdfwrite -sColorConversionStrategy=LeaveColorUnchanged dAutoFilterColorImages=true -dAutoFilterGrayImages=true -dDownsampleMonoImages=true -dDownsampleGrayImages=true -dDownsampleColorImages=true -sOutputFile=output.pdf temp.pdf
  • by miles on 5/12/20, 6:50 PM

    Show HN: FalsiScan – Make it look like a PDF has been hand signed and scanned (770 points, 34 days ago) https://news.ycombinator.com/item?id=22811653
  • by baicunko on 5/12/20, 6:05 PM

    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!
  • by ArneVogel on 5/12/20, 7:19 PM

    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.

  • by atum47 on 5/12/20, 7:16 PM

    Great you decided to share the source code, but then I was able to see that you let the admin session enabled. you can disable that on production

    https://stackoverflow.com/questions/4845239/how-can-i-disabl...

  • by yourapostasy on 5/12/20, 7:30 PM

    Not to detract from this, because it is brilliant, and I'll definitely use in the future as a last resort.

    Before resorting to this, I've found that if I convert the PDF to an image, and send it as a TIFF file, that is usually what the organization's people are looking for. I haven't had to do that for years now.

    On the extremely rare occasions someone asks if I signed it on "real paper" (lol), I say with a straight face, "yep, I'm a computer guy, I have a really good scanner and image software". I do. It's just gathering dust. Last time that happened was about 5 years ago.

    Over 20 years ago, I wrote my signature in thick, black Sharpie across an entire letter-sized, landscape-orientation page, scanned it with the highest resolution scanner I could cadge at the time (600 dpi, wooo!), laboriously cleaned it up, added an alpha channel, then even more laboriously vectorized it. Ever since then, dropping my signature into PDF's has worked except for those situations where a physical, wet-signed notarized document was required.

    At first I took to the trouble to convert the resultant PDF into TIFFs and digitally sign them. Then with some experimentation I found that flattened and stripped PDFs without the digital signature were accepted without comment. Further experimentation revealed to me that only developers like us could even tell the difference, and plain PDF's where I dropped the signature into them are accepted these days.

    Now, I use an Acrobat DC stamp that I converted from the vectorized form, and haven't touched the old bitmap or vectorized versions in years. Ironically, the most secure option of digital signatures gave me the most problems.

  • by switz on 5/12/20, 6:45 PM

    Impressed to see this is your first open source project! What a fantastic blend of simplicity, technology, and wit.

    I love it.

    Original (was PDF): https://i.imgur.com/v5nn1ql.png

    Processed: https://www.scanyourpdf.com/media/Scan_2020512_wegb.pdf

  • by dkonofalski on 5/12/20, 6:43 PM

    I can't believe that I'm saying this but this is soooo needed. It's ridiculous to me how many organizations still require hand-signed copies as if that is somehow a deterrent to anything.
  • by supernova87a on 5/13/20, 12:01 AM

    Not saying this site is, but it makes me think of all the (less legit) file conversion websites which are basically portals to harvest your documents (or your aging parents' documents that they don't otherwise know how to convert), and you later find they appear on crappy sites like Scribd. Or worse.
  • by WalterBright on 5/12/20, 7:59 PM

    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.

  • by j_4 on 5/12/20, 6:30 PM

    Haha, great job. There's also something to be said for the grim humour of how technology led us to this point.

    Sadly, I'd also be extremely wary of sending the kind of documents that I need to print out and sign through some server-side black box.

  • by raldi on 5/12/20, 8:26 PM

    Suggestion: Include some before/after examples
  • by jduckles on 5/12/20, 7:59 PM

    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...
  • by 9nGQluzmnq3M on 5/13/20, 1:36 AM

    Neat site, but is this really necessary? I switched to digital-only PDFs (edit online & slap in image of signature) a long time ago, without doing any obfuscation to make them look "real", and I've never gotten any pushback from the various government agencies, banks, insurance companies etc that insist on signed & scanned forms.
  • by doc_gunthrop on 5/12/20, 7:35 PM

    It looks like what is being used for the transformation is:

    1) set to grayscale (optional), 2) add blur, 3) slight rotational tilt, 4) add gaussian blur (?)

    You can go one further by randomly adding tiny artifacts (ie. specks) to add even more realism. Maybe even a simulated crease in a corner.

  • by secfirstmd on 5/12/20, 6:35 PM

    This is cool and would be useful from time to time with some stupid organisations that insist for some reason on full scanning.

    Perhaps one suggestion. Can you update your documentation a bit to make it easier for someone to be able to implement it themselves? There's not much about that on the Github and I would guess some people would rather run their own locally.

  • by chmaynard on 5/13/20, 2:58 PM

    Apparently I'm the only person on HN that doesn't understand what a "scanned look" means, and the author doesn't provide any images to illustrate. Could someone enlighten me?
  • by camillomiller on 5/13/20, 6:51 AM

    I live in Germany and I never had anyone telling me that a PDF signed digitally wasn’t enough, especially if they expect you to e-mail it back to them. Is this a US problem?
  • by davchana on 5/12/20, 9:53 PM

    What I do, is print the PDF as image, with 60% jpg quality. JPG artifacts make it look like normal quality scan.

    I have my 3-4 copies of signatures as font file, along with initials.

  • by pingec on 5/12/20, 8:40 PM

    Is this project different in some way from many already existing solutions that do the same?

    I like that it is open source and in theory possible to self host since I really wouldn't want to upload my documents anywhere.

    I would really like to know if a similar solution exists that is very easy to run locally or if it runs in the browser it does everything client-side?

  • by SanchoPanda on 5/12/20, 6:41 PM

    Your convert and gs mastery is truly impressive, great job and great project.
  • by fabatka on 5/12/20, 8:47 PM

    Slightly related: add artificial coffee stains to LaTeX documents: http://hanno-rein.de/archives/349
  • by miki123211 on 5/13/20, 11:16 AM

    I believe printing, signing and scanning should be a punishable crime. It has a terrible impact on accessibility, as the whole text layer of the PDF is lost and it becomes unreadable for screen readers.
  • by morisy on 5/12/20, 8:49 PM

    Only semi-related, but I thought their was an open source PDF-flowing tool featured on hacker news a while back (that turned PDF into responsive HTML). Anyone know of something like that?
  • by terrycody on 5/13/20, 1:42 AM

    Really question is in some cases, you still need to sign your signature and then scan the document again, I hope this website can let you add signature automatically...
  • by mapster on 5/14/20, 2:14 AM

    For signing docs I open PDF in Illustrator and place my signature image then save and send. Are they really looking for signs of document having been scanned?
  • by thesis on 5/12/20, 10:43 PM

    Pretty cool!

    What I normally do in a pinch is use Google Drive.. it has a "scan" option that you can take a picture with your phone.

  • by hawaiian on 5/12/20, 11:58 PM

    Needs options for adding dog ears and a shadow cast from the top of the page, and maybe stapler holes.
  • by aasasd on 5/13/20, 2:00 AM

    Funny thing is, some countries require documents to be signed on paper and then scanned. E.g. Japan.
  • by Havoc on 5/12/20, 9:39 PM

    What are the legitimate uses of this? The only uses I can think of are less than kosher.
  • by lilblockchains on 5/12/20, 7:24 PM

    That's a pretty cool project. Do you mind explaining your deployment process?
  • by electriclove on 5/12/20, 10:19 PM

    Can this be done client side so the PDF does not need to be uploaded anywhere?
  • by sergiotapia on 5/13/20, 2:21 AM

    can you put an example picture side by side, right on the frontpage
  • by krick on 5/13/20, 12:47 AM

    Seriously, how stupid it is that this can be actually useful.
  • by greenknight on 5/13/20, 12:04 AM

    You may want to purge the key in your repo (settings.py)
  • by IRM on 5/13/20, 12:28 PM

    Hav somebody download ROBLOX on a school computer
  • by underlines on 5/12/20, 8:38 PM

    Why not deleting the file after 1 download?
  • by ecnahc515 on 5/12/20, 11:23 PM

  • by bastard_op on 5/12/20, 7:09 PM

    I just edit files with masterpdf under the linux free version, and send them back with a transparent png of my signature merged. Good enough.
  • by talkinghead on 5/13/20, 7:59 AM

    example on landing page would be great
  • by ladybro on 5/12/20, 7:02 PM

    Genius. Nice work.
  • by IRM on 5/13/20, 12:27 PM

    have somebody download Roblox on school compoter
  • by abiogenesis on 5/13/20, 12:13 AM

    Obligatory xkcd reference: https://xkcd.com/1683/
  • by behnamoh on 5/12/20, 7:41 PM

    To OP:

    the server is down.