Live data from Hacker News

FalsiScan: Make it look like a PDF has been hand signed and scanned

gitlab.com

211–220 of 399 posts

Re: FalsiScan: Make it look like a PDF has been hand signed and scanned

#211
A similar absurdity is that most legal documents filed with the courts in the USA now use "conformed signatures" which means you just type your name and put /s/ next to it. That means you pretend you have a "wet signed" document somewhere to back it up, but in reality no lawyer is doing this.

https://www.cogencyglobal.com/blog/getting-document-signatur...

You can even sign your life away like this, especially as most notarization has now been replaced by systems like Verification by Certification.

https://www.ilga.gov/legislation/ilcs/documents/073500050k1-...

https://en.wikipedia.org/wiki/Sworn_declaration

Re: FalsiScan: Make it look like a PDF has been hand signed and scanned

#212
post #184

I have a shell script based on ImageMagick that gives a PDF a "scanner" look. I typically open the PDF in Master PDF Editor to insert an image of my signature, then pass it through my script. When I do need it, it's rare, but it becomes a real life saver. It has avoided me the need to print and scan 100+ pages for a mortgage company, some stock brokers and banks. Key points of the script: "+noise Random -fill white -…

I have a script for the same purpose too, but I prefer a black-and-white 1-bit palette for that fax look. Here's my version -- note that it uses graphicsmagick, img2pdf, optipng, and pdftk. Also enforces A4 so some of you may want to change that. For fun it's doing the page processing in parallel to speed up a bit with large documents.

    #!/bin/bash

    # Adds a bad scanning effect to PDF files.

    if [ $# -ne 2 ]; then
      echo 1>&2 "Usage: $0 input.pdf output.pdf"
      exit 3
    fi

    convertPage() {
      # PDF filename in first parameter, page in second
      file=$1
      page=$(($2-1))
      png=$(printf "pdf2scan-page-%05d.png" $2)

      # Convert PDF page to black and white PNG
      gm convert -density 300 "$file"[$page] +dither -rotate 0.35 +noise Gaussian -type bilevel -fill white -fuzz 90% -colors 2 $png

      # Optimize PNG
      optipng -silent $png
    }

    export -f convertPage

    # Read number of pages
    pages=$(pdftk "$1" dump_data | grep NumberOfPages | sed 's/[^0-9]*//')

    # Loop through pages and convert in parallel
    for i in $(seq 1 $pages)
    do
      echo "$1":::$i
    done | parallel --eta --colsep ':::' convertPage {1} {2}

    # Create PDF from PNGs
    img2pdf -o "$2" --producer "" --pagesize A4 pdf2scan-page-*.png

    # Remove temporary files
    rm pdf2scan-page*
For a cleaner 1-bit look without noise and rotation, use "gm convert -density 300 "$file"[$page] +dither -colors 2 -type bilevel -fill white -fuzz 40% $png".

Re: FalsiScan: Make it look like a PDF has been hand signed and scanned

#213

Hey Gitlab, could you consider adding the following CSS so that README images don't break out of their containers? Having to horizontally scroll to see this image is brutal. .md img { max-width: 100%; height: auto; } I think that goes here: https://gitlab.com/gitlab-org/gitlab/-/blob/55a4cc5a53903250...

[deleted]

Re: FalsiScan: Make it look like a PDF has been hand signed and scanned

#214

Earlier quoted context omitted.

The point is to authenticate residency, and while it’s not a great system, there also isn’t any better alternatives.

If all this was for is to ensure you live at an address then the local government can offer a number of solutions to that. If they want mail, they can simply mail you a unique qr code which you could then scan and complete the process entirely online. Or at a minimum bring physically to an office. A utility bill doesn't require proof of residency to get. Neither does a credit card statement. Infact if I were creative…

I agree with everything you're saying, but disagree with the reason.

The US federal government has to be too loose about keeping track of citizens specifically to avoid looking too fascist. One of your many American rights is to have no ID at all. Protecting that right for two dozen people makes everything extremely complicated for the rest of us.

Re: FalsiScan: Make it look like a PDF has been hand signed and scanned

#215

Earlier quoted context omitted.

The point is to authenticate residency, and while it’s not a great system, there also isn’t any better alternatives.

If all this was for is to ensure you live at an address then the local government can offer a number of solutions to that. If they want mail, they can simply mail you a unique qr code which you could then scan and complete the process entirely online. Or at a minimum bring physically to an office. A utility bill doesn't require proof of residency to get. Neither does a credit card statement. Infact if I were creative…

The point isn't to prevent a skilled attacker. The point is to prevent casual lying and low-skill fraud. Most people who lie/cheat/steal do so because it's easy or because they're dumb. Your QR code idea will cost more money to implement and won't block skilled attackers either, as it doesn't take a genius to figure out a way to get mail from a mailbox you don't own.

Utility bills are the DMV's equivalent of a cheap lock. A smart attacker can pick the lock, and a determined attacker can cut it off. But the majority of thieves are walking around looking for unlocked car doors instead.

Do you really think DMV asks for a copy of a utility bill because it's a good way to suppress your rights? I would think that there are plenty of more effective ways to do so, if that were actually their goal.

Re: FalsiScan: Make it look like a PDF has been hand signed and scanned

#216
post #95

I had another version of this at the DMV. They needed to see bills that offered proof of my residence (ie power/water/etc). Turns out they wanted them to be mailed to you, which wasn't going to work because I do paperless billing for everything. So I printed them out and tri-folded them as if it had been in an envelope. People in front of me in line got turned away for using printed bills, but mine worked just fine.

Yes, they also do this for ID's, and for voter ID's. It's specifically created to prevent people whom don't have only 1 permanent address,with paper billing, being able to live their daily lives. I had to go to a local county courthouse 4 times to get a "realid" and to renew a driver's license. I had to call all sorts of people to get printed statements sent to me. It's incredibly ridiculous, I would call it complete…

As a counterpoint, I had no problem using a printed cell phone bill as evidence of residency at a California DMV.

Re: FalsiScan: Make it look like a PDF has been hand signed and scanned

#217

Earlier quoted context omitted.

I mean, extend the canvas but keep the original image as it is.

Ahh, yes. I have wanted to do this too, and can’t. I suspect Preview isn’t the tool I’m supposed to use, even though it’s the ones I want to use as it doesn’t almost everything I want.

Exactly! It does everything BUT that, and because of that you have to go open a different app.

Re: FalsiScan: Make it look like a PDF has been hand signed and scanned

#218
post #184

I have a shell script based on ImageMagick that gives a PDF a "scanner" look. I typically open the PDF in Master PDF Editor to insert an image of my signature, then pass it through my script. When I do need it, it's rare, but it becomes a real life saver. It has avoided me the need to print and scan 100+ pages for a mortgage company, some stock brokers and banks. Key points of the script: "+noise Random -fill white -…

I have a script for the same purpose too, but I prefer a black-and-white 1-bit palette for that fax look. Here's my version -- note that it uses graphicsmagick, img2pdf, optipng, and pdftk. Also enforces A4 so some of you may want to change that. For fun it's doing the page processing in parallel to speed up a bit with large documents. #!/bin/bash # Adds a bad scanning effect to PDF files. if [ $# -ne 2 ]; then echo…

The 1-bit palette is a good touch. Making it use parallel(1) is a great and easy optimization. Nice!

Re: FalsiScan: Make it look like a PDF has been hand signed and scanned

#219
post #95

I had another version of this at the DMV. They needed to see bills that offered proof of my residence (ie power/water/etc). Turns out they wanted them to be mailed to you, which wasn't going to work because I do paperless billing for everything. So I printed them out and tri-folded them as if it had been in an envelope. People in front of me in line got turned away for using printed bills, but mine worked just fine.

Similar issue at our version of the DMV, the Traffic Department.

Had to provide proof of address and the only thing I had was the rental agreement with my landlord. But the copy I had was signed by me, but not countersigned by my landlord.

The clerk didn't want to accept it. I told him I could just walk out and fake a signature. He said that's OK and that he isn't a policeman. So I countersigned it in front of him. He paused and then accepted it.

Re: FalsiScan: Make it look like a PDF has been hand signed and scanned

#220

Earlier quoted context omitted.

If all this was for is to ensure you live at an address then the local government can offer a number of solutions to that. If they want mail, they can simply mail you a unique qr code which you could then scan and complete the process entirely online. Or at a minimum bring physically to an office. A utility bill doesn't require proof of residency to get. Neither does a credit card statement. Infact if I were creative…

The point isn't to prevent a skilled attacker. The point is to prevent casual lying and low-skill fraud. Most people who lie/cheat/steal do so because it's easy or because they're dumb. Your QR code idea will cost more money to implement and won't block skilled attackers either, as it doesn't take a genius to figure out a way to get mail from a mailbox you don't own. Utility bills are the DMV's equivalent of a cheap…

Do you think low skilled fraud doesn't have access to a printer? If it cannot be implemented properly, then it shouldn't be done at all. It doesn't matter what good intent it may have had, in effect it is a suppression of individual rights. This entire process would be grounds for a civil war in the 1800's. Yet today we think being a citizen isn't enough to have rights. You have to be apart of a socioeconomics nomic class of people to have those rights.

The DMV complies with whatever regulations are imposed on them. Those rules are created by legislators whom are entirely disconnected from their constituents and are paid for their votes.

Post reply on HN