
Show HN: FalsiScan – Make it look like a PDF has been hand signed and scanned - linschn
https://gitlab.com/edouardklein/falsisign
======
aclimatt
Ha! My co-worker made one of these for the same reason. Some places still
require "wet" signatures, and some people (us) like to stick it to bureaucracy
and prove that they can't tell the difference.

For a one-liner, if you use any tool to generate a realistic version of your
signature, or do what I do and actually scan a version of your signature once,
and then have that as a PNG that you can drop on any PDF of your liking,
here's a line to make it look nice and "scanned":

    
    
      convert "$1" -alpha Off -density 150 -colorspace gray -blur 0.5x0.5 -rotate 0.4 -level 40%,60% "scanned-$1"
    

Or for even more noise and poor quality:

    
    
      convert "$1" -colorspace gray \( +clone -blur 0x1 \) +swap -compose divide -composite -linear-stretch 5%x0% -rotate 1.5 scanned-$1.pdf

~~~
tareqak
Is that an invocation of the `convert` tool from ImageMagick?

~~~
aclimatt
Yep, it just uses ImageMagick's `convert` to take the PDF, rotate it a little
bit, blur the text, and generally reduce the quality just like a scan would.

The OP also uses a few other flags like `+noise Gaussian` and `-attenuate
0.25` which you could toss in. Same concept, just wanted to share a one-liner
you can use if you already have a PDF with a signature on it, and you need
that nice "scanned" look.

------
spapas82
In my organization we have a different problem. We heavily use signed pdf
files for all our internal documents - if a document is not signed it's not
valid (they are mainly signed with JSignPdf). A number of internal
applications need such signed files in order to proceed with a workflow.

Checking if a PDF file has been digitally signed, how many signatures are
there and if the signatures are all valid is not an easy task! Actually, I
only know how to do it in java using bounty castle. To help non-java apps with
this I've implemented a small java application that provides a REST (and form)
api for uploading a signed PDF file and returning information about the
signatures.

It works in my organization for more than 3 years and it's has saved us from
hundreds of erroneously signed PDF files! I've open sourced it for anybody
having similar requirements: [https://github.com/spapas/pdf-sign-
check](https://github.com/spapas/pdf-sign-check).

~~~
gbasin
Cool project. Micro SaaS opportunity :D

------
mikehollinger
Mac’s pdf viewer Preview has a signature capture feature built in that’s
pretty slick. I use it all the time and haven’t encountered an objection. Tbh
I’d wonder why you need to fuzz up and fake scan the image. If someone’s
requiring that the doc be “signed in ink” or some such, more power to you!

~~~
NelsonMinar
Schwab (the bank in the US) started rejecting my signatures, on the basis that
several documents I submitted had identical signature images. I worked around
that by making a new signature, but you could imagine them escalating to also
complaining about the fact it was not wet ink.

~~~
dorkwood
I had an application to open a new bank account rejected because my signature
was not close enough to the one they had on file. I tried resolving things
over the phone, but no luck. So I closed all my other accounts and switched to
a different bank.

~~~
blntechie
I had a similar problem once at my bank while submitting some inconsequential
form but for bureaucratic reason the signature in the form had to match with
what they had in the file.

As I had opened account with them years back, I couldn’t recollect what I had
signed then. The clerk at the desk helpfully turned her display for me to take
a quick glance at the signature in the file which I copied in the form.
Thanked her well.

------
turbinerneiter
I don't get the magical power of a signature at all. Everybody can write my
name under a document.

This project basically allows you to forge your own signature. Is it still
legally binding? Do these rules even remember the original intent?

~~~
jabroni_salad
The act of marking the sig field shows your intent to bind to the contract.
You can digitally sign but there are a couple extra steps to confirm the
intent and identity that aren't hard but are just hard enough to make DocuSign
a lot of money and leave everybody else to print/sign/scan their stuff.

~~~
arkanciscan
So you're saying the signature itself is irrelevant? It's just an elaborate
checkbox? The question then is how do you prove _I_ was the guy who checked
the box?

~~~
xnyan
It’s sort of is actually. What really matters is the providence of the
approval, the adult trail or whatever you want to call it. You are creating a
record of when and that you agreed to something and the signature is an
artifact of that agreement.

A signature is somewhat harder to take them and checking a checkbox and can be
somewhat more easily traced back to the signatory, so it’s probably somewhat
better than a checkbox.

~~~
oneplane
So in hipster terms: it's a paper blockchain that isn't immutable and has no
real identity ;-)

~~~
Spivak
I mean it's just a paper record. It's existence alone doesn't necessarily
prove anything on its own. It's when you're making a case to a judge that you
didn't buy 1700 rolls of toilet paper they can say bring it out and say "Yes
you did and we have your signature."

You're free to counter and say it's a forgery just as you would be to counter
and say someone stole your private key. But the point of a signature in
particular is that it's supposed to signal considered intent rather than
mindlessly checking a box or being rushed and saying "sure sure whatever."

We pop up dialogs to ask users for confirmation before doing dangerous
actions. What's wrong with the paper equivalent?

------
ebencooke
Questions about the reproducibility of signatures reminds me of this case
[https://en.wikipedia.org/wiki/Howland_will_forgery_trial](https://en.wikipedia.org/wiki/Howland_will_forgery_trial)
in which Charles and Benjamin Pierce were brought in as expert witnesses.
There's a good account in
[https://en.wikipedia.org/wiki/The_Metaphysical_Club:_A_Story...](https://en.wikipedia.org/wiki/The_Metaphysical_Club:_A_Story_of_Ideas_in_America).

------
lima
It's not a false signature, this kind of thing is standard practice for
digitally signing documents. DocuSign even allows you to insert a computer-
generated signature that looks nothing like your "real" one. What matters is
the audit trail.

This is legally binding the same way clicking the "Buy" button on Amazon is.

~~~
sbarre
Yes yes that's all nice and good until the person you're signing the document
for tell you "I don't care what someone on Hacker News thinks is good enough,
I need this signed in ink".

I've encountered this before myself, and so have many other people, and we're
all already aware of what you're saying.

------
zelly
I have to do this quite often. I end up using a scanned image of my signature
with Gaussian noise added in Photoshop. You can add Gaussian monocromatic
noise to the whole page (and rotate it slightly, for good measure) to make it
look like you killed a tree.

------
giancarlostoro
(HBO) Silicon Valley Reference: That looks like the Gavin Belson signature.

This is kind of useful though, I was in shock and horror when I realized one
PDF my Adobe Fill & Sign app couldnt... fill and sign, an actual IRS tax form.
I don't know why they let you fill most of it out but force you to sign the
damn thing. What's even more confusing is other forms don't restrict this,
it's just one of the ones I tried (can't remember which one but it was a while
ago).

~~~
saagarjha
I think there's a much less niche thing it might be referencing.

------
TehShrike
The shell scripts depend on a "convert" cli command – that command doesn't
exist on my machine, and I can't find any reference to it in the
documentation, does anyone know where that command comes from?

~~~
turdnagel
Convert is an alias to "magick convert" which is a command built into
ImageMagick. Installing ImageMagick is pretty easy, usually just
`[packagemanager] install imagemagick`

------
bambax
I usually do the same thing, manually. I have a set of about 10 signatures
that I vectorized (so that they scale with no visible artifacts). I apply one
of those signatures to the PDF documents in an editor that can edit PDFs
(currently using Affinity Designer or Publisher, they're excellent).

Then I take pride in outputting the cleaniest PDF possible. Never received any
complaint. Most people on the receiving end probably print them out, and they
appreciate the clean result, compared to what you get when you re-scan it (or
intentionally blur it).

That said, for 27 pages (!!) that tool would prove a lifesaver.

------
globular-toast
Last time I had to do this was for a two page document which required a
signature on the second page. Even though I thought it was silly, I did sign
the second page in ink and scanned it. It was rejected because I didn't also
scan the first page despite it requiring no changes. At that point I just
concatenated the original first page to my initial signed scan and sent it
back and it was all fine.

Ridiculous.

One thing I did think about, though, is the legal aspect. Fraud is a serious
crime and I wonder if such a thing, however silly, might just be considered
fraud. In that case it might not be worth fighting the bureaucracy.

------
thatguyagain
Nice example signature

------
cs02rm0
_For bureaucratic reasons..._

I feel that pain. When your only tool is bureaucracy everything looks like a
nail. Or something like that.

I once had what I think was a document for a mortgage application refused
because I'd printed it, signed it and took a photo on my phone to email back.
Apparently it had to be done with a scanner and a camera was unacceptable.

I didn't have a scanner, so I chanced my arm, desaturated and thresholded the
image then resubmitted it. I was thanked and it was accepted.

------
rolandog
I was thinking of doing something like this the day before yesterday! I love
your implementation! Extremely useful.

I actually wrote about the laborious effort to create a pseudo 'false
document' by manually using Gimp on my blog; I wrote a very naive back-of-a-
napkin pseudo algorithm... I was actually thinking about learning Gimp's
Script-Fu to generate the signature with the Ink Tool.

------
awirth
From this scripts, it looks like this doesn't convert to black and white, so
this might work with Hanko (Japanese stamp seal) too?

~~~
linschn
If it doesn't, please do not hesitate to open an issue and I'll look into it
:)

------
DeathArrow
I could use a mobile app to do that.

In my country, to leave your home to do shopping in this period, you are
required by military ordnance to fill a form stating the reason of leaving
your home. You can show it on your mobile phone, but you have to print it,
sign by hand and take a picture of it.

~~~
mr_toad
What if you don’t have a working printer at home? Do they just let you starve?

~~~
DeathArrow
You can write the thing by hand.

------
forinti
Financial department wanted me to turn in a signed document after lockdown. I
have an HP 3 in 1 but it no longer prints. So I scanned my signature,
extracted it with gimp, and added it to the document. The result was
excellent.

------
jimothyhalpert7
Has anyone had any experience trying to prove the authenticity of a signature?
I remember reading somewhere that there are only three universities in the
world, that have a department specializing in detecting signature forgery.

------
pingec
This is great, thanks for sharing!

Does it support multipage pdf documents and doing multiple signatures per
document?

Related to this, perhaps a UI for marking all the spots where signatures are
required would make this tool extremely powerful!

~~~
linschn
Thanks, It does support multiple page, it will add a randomly chosen signature
at the same place every page.

The ui is going to be a lot more complicated to code. Maybe I'll give it a try
someday.

------
mkchoi212
Immigration documents often need to be hand signed and scanned. This looks
cool and everything but not sure if I'd risk getting an immigration
application rejected :p

Will try on other less official stuff though ha

------
ornornor
The Preview app that lets you very easily sign PDFs is a piece of software I
very dearly miss on Linux. There are solutions on Linux but none as smooth and
universal as Preview.

------
davchana
This is at least one place where JPG compression helps. In PDF Xchange, I drop
in my scanned clear signature (a font), then merge & pdf print the page as 50%
jpg quality.

------
entelarust
TIL about the WTFPL license ;)
[http://www.wtfpl.net/about/](http://www.wtfpl.net/about/)

------
ulucs
I love the idea. Is there any way to programmatically distort a digital
signature so that I can avoid printing the signature pdf too?

~~~
131hn
that would be forgery, i’ll say

~~~
sjwright
If it's your own signature, by definition it cannot be a forgery.

------
hwc
I just printed the pages I needed to sign, signed them, scanned them, and then
stitched them into the original PDF.

------
ocdtrekkie
kentonv was looking for something like this late last year!
[https://twitter.com/KentonVarda/status/1199022850369146880](https://twitter.com/KentonVarda/status/1199022850369146880)

------
kotutku
Neat!

I've been doing this manually by adding my signature in GIMP and taking a
photo of my laptop screen.

------
endergen
Well, this is the greatest open source project ever. Time to close for the
reason, internet.

------
arkanciscan
Is anyone aware of an actual court case where the validity of a DocuSign doc
was held up?

~~~
tathougies
DocuSign is valid by statute:
[https://en.wikipedia.org/wiki/Electronic_Signatures_in_Globa...](https://en.wikipedia.org/wiki/Electronic_Signatures_in_Global_and_National_Commerce_Act)

Their security implementation or the authenticity mechanism they have for
recording is not even really up for scrutiny, so long as they can provide some
kind of proof that the signing occurred and that the counterparty signed with
an understanding that the electronic signature was the same as a real
signature.

------
pedro596
Very nice, just wondering the security implications of having those nice PNGs
stealed, someone can sign anything in your behalf...

Adding some known pattern to the signature that can be recognized later in the
print would be nice if you need to prove that it was not actually signed by
you. But if you get to this point it is already a big mess...

------
MaxBarraclough
Interesting idea, but to me, the output just doesn't look like a scanned
document.

------
ronyfadel
This is cool! Now someone make an app out of this please :)

------
xenonite
Did you note that the example signature is a phallicism?

More of these in "Signature_example.pdf".

In my opinion, this is a bit childish. But on the other hand, the whole scan-
and-sign procedure is also a bit childish if you ask me.

------
A4ET8a8uTh0
It would not work for us, but I appreciate the spirit of trying to save trees
from pointless markings. Love it.

------
danbenoni
Pretty dope.

------
popotamonga
Why is this a thing? Why not sign it with a proper digital certificate? In my
country we can sign documents with our id card.

~~~
ceejayoz
The USA doesn't _have_ a national ID card.

~~~
bagacrap
Passport

~~~
tecleandor
Not everybody has a passport. A Passport costs more than a hundred dollars.
Not everybody is eligible to a passport. For having a passport you need
nationality, and you need to be able to have contracts with non national
persons.

~~~
PeterisP
Your comment about nationality seems interesting - it's a fundamental human
right to have nationality
([https://www.ohchr.org/EN/Issues/Pages/Nationality.aspx);](https://www.ohchr.org/EN/Issues/Pages/Nationality.aspx\);)
what do you mean by "non national persons" ? The common mass cases e.g.
illegal immigrants are not non-national persons, they're just nationals of
some other country. There are certain edge cases that result in stateless
people, but the general solution for that is for states to work to assign
nationality, it's definitely reasonable in many countries to not be able to
have standard contracts with such people until they get their identity
documents issued.

~~~
tecleandor
I might live in in a country I'm not a national, so I don't have a local
passport.

Illegals often cross borders without papers, so they don't have any passports
to sign anything.

Sorry I'm brief, but I'm super busy today :P

