Sunday, January 1, 2012

Handwritten Signatures in MS Word

How many times have you had to print a Word document just so you can sign it and then fax/scan it back to someone?

Ideally you should be able to add your signature directly to the Word document, and then print it to PDF or just send it. This turns out to be really tricky to do, but today I've cracked the problem.

Typically, you get a document looking like this:

How do we add a signature? Well, we could sign our name on a white piece of paper, scan it  and just plant that image in Word, right? Not quite. When you scan an image (or take a photo with your iPhone for that matter) you get a JPEG image, and JPEG images do not support transparency.

Here's what a scanned signature looks like right off the scanner:

First thing you'll notice is it's big. If you want your signature to look legit when the document is printed you have to scan it at at least 300 DPI. Your computer screen, however, has a resolution of about 75 DPI normally. So if you add this photo to Word you'll have to re-size it down. The end result is something that looks like this when printed:


First of all, the white background of the signature photo is opaque. As a result the image hides the "Signature" text and the line we're supposed to sign on. We want to somehow make the white areas transparent, so that when we plant the signature onto the page it looks as if it was drawn on by hand, not plastered on with a computer. This can be done with image editing software, such as Paint.NET (free), if you know what you're doing. The resulting image must be saved in a more appropriate image format - one that supports transparency. Best is PNG. 

But even that's not enough. The end result, when printed, still looks terribly fake. Here's a close-up version to illustrate:

See how pixelated it looks? When you print this on a piece of paper you definitely see the difference. Why is this happening? Didn't we take a hi-res scan of the signature?

Why? Because Word is dumb. When you scan an image in high resolution (e.g. 300 or DPI, same as a good printer) the image you get on your computer is big. When you then resize the image in Word to fit the signature space, Word just prints the picture as it appears on screen (i.e. in 75 DPI). It's not smart enough to say "this picture is scaled down, but I do have the original high-resolution at hand, so I can send it to the printer at 300 DPI".

Also, what if we want to print at 600 DPI, but our scanned image is just in 300 DPI? Ideally we'd want a vector image of our signature, not a raster image. Vector graphics nowadays is usually saved in the popular (and open) SVG format. And you can find services online that will try to convert a raster image (e.g. jpg) to SVG. Only one problem with this: Word can't handle SVG. So there's one more hoop to jump through.

Here's what you need to do to take a scanned image of a signature and convert it to something you can actually add to Word. You need just one application - it's called Inkscape and it's a totally free vector graphics application. 

  1. Take a white A4 paper and put your signature on it using a nice, thick pen.
  2. Scan it at 300 DPI (grey-scale is fine, too).
  3. Crop out everything but the signature. This can usually be done in the scanner program itself if you do a pre-scan. But you can also do it with MS Paint.
  4. Save it as JPG.
  5. Open Inkscape.
  6. Drag and drop your scanned JPG into Inkscape.
  7. Select the image in Inkscape and choose Path -> Trace Bitmap from the menu.
  8. Use "Brightness Cutoff" with a high threshold (over 0.9) and press Ok. 
  9. It will create a vector version of the signature and place it directly above the image. Drag it away to see the difference between the two.
  10. Feel free to play with the threshold until you get a good reproduction of the original image.
  11. Now select the original image and delete it (DEL).
  12. Select the good vector version and do File -> Document Properties -> Fit page to selection.
  13. Now save as EMF
  14. You can now drag and drop this EMF into Word. Make sure the Text Wrap property of the image in Word is set to "In Front of Text" and then just place it over the signature space.
Here's a close-up of the raster vs. vector images side by side in Inkscape:

Here's just one letter scaled way up, just so you see how good the vector version is:

And here's what it looks like in Word:

Keep that EMF file at hand. No more printing, faxing and scanning. 


OhadG said...

well, in Word2010 you can simply:
1. Insert -> Signature line
2. Double click on the automatic signature line created for you, and there you "select image..." of your signature (almost any image acceptable there).
3. your image signature is placed automatically above the line, no quality reduction.

your method above is good if you insist to have some pixels below the line.

Assaf said...

I tired it. Very poor quality.

Even though it's based on a high res PNG scanned at 300DPI. And it doesn't even allow me to rescale or move the signature on the line..

OhadG said...
I guess it depends on the brush you used for your signature. I used a png 96DPI image and that was the result.

Anyway, indeed you don't have the control for rescale and move. For simple users it may be enough, for those who work plenty with forms - your method would be cleaner.

Assaf said...

First, the quality of your picture is terrible...

Second, I'm not painting with a brush. The whole point is to scan your actual signature, which is very hard to replicate with a mouse.

Third, you took a screen capture of word on a 75DPI screen. It still looked bad, but if you were to print it (try it) you will see how awful it looks.

OhadG said...

I just thought of it. Sometimes Word form would be sent with different backgrounds.

In this case, trying to add the built-in signature-line when the image attached is with white background would not be acceptable.

Your solution covers this scenario as well :). Very good.

Doug_Rodgers said...

This is EXACTLY what I was looking for. Thank you for posting such detailed instructions. You made my day!!! Thanks again!

Un Paisano said...


This worked EXACTLY as you outlined and allowed me to drop in a signature to Word doc that I then saved as a PDF. MUCH BETTER than the alternative of signing and scanning a copy of the document into a PDF since Word saves a crisp and clean copy.

KUDOS to you my man!!!!

Jerry in China said...

I agree: I followed your instructions exactly and it worked perfectly. Brill.

Unknown said...

I also agree - great stuff; this is exactly what I was looking for. Very well done.

Rudy said...

Totally , I was so frustrated with Word that all signature looks terrible until I read your detailed instruction on using the apps. Thank you verymuch !!

vengahowie said...

I use Inkscape for Mac, which apparently does not allow one to save as EMF. Any alternative method? Thanks.

Unknown said...

To the last poster, I also had that trouble as my Mac would not save in EMF format. So, I saved in PNG format and it then worked flawlessly. I then dragged the image into my Word document, rescaled it to the size that I would normally sign and it looks perfect. Thanks for this blog!!!

Assaf said...

As Valerie suggested, exporting to PNG may also work, as long as you export it in the resolution you want to print in. For example, if you're print with a laser printer, you're likely printing at 600 DPI (dots per inch). So in Inkscape, select Export to Bitmap and then make sure the DPI is as high as 600. The resulting PNG image file will be big, mind you. But that's the sort of resolution you need to get a quality print.

Frederick said...

Thank you for your posting. Your instructions were very clear and easy to follow. Unfortunately, I have had an issue with dragging my signature into the word file. I am able to save my new vector based signature as an EMF format, but still cannot drag and drop the signature. If I copy and paste, it blocks out the line and the areas between the letters are now filled in with "white" as opposed to having a transparent background. Does anyone have any suggestions? Thank you all in advance.


Assaf said...

Frederick, are you certain you followed step 11? It sounds like the image you're saving still has a background.

Exhack said...

When I saved the file at the end it ended up in Paint, I've no idea why. But I'm working on it.

Unknown said...

Works GREAT. Been looking for a way to do this forever. Thank you!

VC said...

Thanks much for sharing this.

Miami Beach Immobiliare said...

The sad thing is that EFX pro did that all those steps could import any signature as a jpeg on white background...emailed or faxed to you and it would automatically cancel out the white background to put it flawlessly.....then EFAX took a crap and stopped working properly with Windows 8 and MAC....but with a few steps I can still use it....just not as quick as it used to. BUT it's sad that EFAX had a fast/easy system to do all that and there's nothing out there that even comes close

Unknown said...

Worked well! Thanks for posting

Unknown said...

I did not work for me at all. When I use "Brightness Cutoff" with a high threshold (over 0.9) and press Ok, the result is a black screen, nothing in it.

Unknown said...

I just reminded myself that I could do precisely this in WordPerfect -- dropping in a png file, then clicking on it for formatting and, importantly, setting "fill" to transparent. The program lets you move around the signature graphic, and resize it, easily. With Word you have to go into position and wrap. Wish Word had this transparency switch.

Unknown said...

Even I got a black screen when I used Brightness cut off, instead of that I tried colour cut off and also removed backgrounds, which worked. Great tutorial though. Thanks

Unknown said...

Fantastic....just what I're a genius . Thanks for sharing.

purelica said...

Thank you. Works perfectly for me.

ICS Cyber Security said...

I reached your post I was trying to understand why a "certificate" is needed. My take away is that it is purely to transfer the public key in an authentic way. Thanks :-)

digital signature software

Unknown said...

Thank you for sharing this article. I know Microsoft Office has its own plug-in for saving Word and Excel as PDF files. But if anyone need to convert Word to PDF on other applications, a third-party converter is necessary. I use a converter, which support Word, Excel and Tiff to PDF, tiff, word and convert Word to PDF, I think it's also a good tool.

Justin L. Brown said...

The business duplicate close down is a critical part of the business procedure, to some degree like a decision, however more an individual letter from you to your purchaser underlining precisely why they require that specific item. The right close down can drive your changes notwithstanding when it is put in after the request box.

Post a Comment