My OS is Ubuntu. So I prefer Linux/Debian software, but any Windows software that can run under Wine or mono would be okay too.

I have a scanned pdf file which is an application form, and a picture which is the scanned version of one's signature (for example, this one) and can be in any image format such as eps or png. I would like to put the signature picture on the blank space right to "APPLICANT:" on the second page of the application form. I wonder how to do that?

I have tried the following methods, but none succeeded.

  1. The first way is using gimp. I first import the application form into gimp, and then paste the signature picture on the space right to "APPLICANT:" on the second page of the application form.

    But the problems are that:

    • It seems that I can only import one page of the application form into gimp, not all of the two pages.

    • Also when I save the modification, the closest format to pdf I can save to is ps, and the resolution has been downgraded and the storage size of the saved file is 10 times bigger than the original application form and the signature picture.

  2. The second way is using Libreoffice Draw. I have installed the libreoffice-pdfimport package. But after I import the application form into Libreoffice Draw,

    • all the scanned content is not imported, and

    • the layout is different from the layout of the original application form.

So what other ways can I try? I would prefer some way that can lay the signature picture directly on the application form pdf file,

  • without having to convert between formats,
  • without having to create much bigger files while keeping the original resolution,
  • without having to split and combine pages of a multi-page pdf file,
  • without having to rasterize other parts of the pdf file, i.e. without losing the text I later added to the application form pdf file by having to convert the whole pdf into images.



I would do it like this:

  1. Create a blank page PDF with just the signature in the lower left corner on it. If you wanna be fancy, make the signature blue or red or green.... Important: the page should use a transparent background, not a white one! Keep this around as the "master-sig.pdf".

  2. Use Ghostscript to convert the "master-sig.pdf" into a new "working-sig.pdf" page, with the signature shifted to the spot where you need it:

    gs -o working-sig.pdf \
       -sDEVICE=pdfwrite \
       -c "<< /PageOffset [216 504] >> setpagedevice" \
    This one would shift the signature by 3 inches to the left, and 7 inches to the top (72 points in PostScript == 1 inch on a ruler). You'll have to experiment a bit, or apply a hardware ruler on the piece of paper printout (plus some algebra) to determine the correct numbers.

  3. Use pdftk to overlay the "working-sig.pdf" onto your "contract.pdf" with the result as "signed-contract.pdf"

    pdftk \
        contract.pdf \
        stamp   working-sig.pdf \
        output  signed-contract.pdf
  • In the current version of Ghostscript (9.50), I've had to tweak the command line syntax to make the first command work (your mileage may vary), I had to add -f before the input argument: gs -sDEVICE=pdfwrite -o working-sig.pdf -c "<< /PageOffset [216 504] >> setpagedevice" -f master-sig.pdf. – Manu Jun 10 '20 at 14:15

If you are using Ubuntu:

sudo apt-get install pdfedit

To start PDFEdit, type:

$ pdfedit /path/to/pdf.file &
$ pdfedit &

This will give you use of a PDF editor to fix your problem.

This software is a WYSIWYG visual editor that also supports scripting and almost anything can be scripted. PDFedit is a low-level tool for users. You can use this software:

To write / create / edit PDF files.

Print PDF files.

Save PDF files.

Export PDF files to XML etc.

  • 1
    Can you please give a short description of how pdfedit works, to solve the problem? – user3463 Jul 24 '12 at 3:12
  • 1
    Thanks! As @Randolph said, could you explain how pdfedit can add a picture onto an existing pdf file? – Tim Jul 24 '12 at 3:30

As of 2018, pdfedit is no longer in any repositories, but happily LibreOffice Draw (likely installed on Ubuntu already, or easy to get through your distribution's package manager) now works very well to edit text on most PDFs (for instance to fill in forms) and to insert images (for instance to paste in your signature).


Forget about LibreOffice Draw. Use LibreOffice Writer. I've got the entire process written in a blog post over at http://colans.net/blog/signing-document-image-ubuntu-1210 .

  • The tutorial presents LibreOffice Draw and not Writer. Anyway, on my computer LibreOffice automatically switches to Draw when I want to open a PDF. – Eric Masseran Jan 15 at 17:18

The LibreOffice provided answers don't keep the appearance of the text.

Use LibreOffice Writer, but this way:

  1. Create a new LibreOffice Writer document;
  2. Remove margins through Format → Page;
  3. Import each PDF page through Insert → Image;
  4. You can lay any image over the inserted (original) ones.

Use pdflatex/xelatex/lualatex. These programs can read images and pdfs and create new pdfs.

  • 1
    My question is that how do you place the picture at some particular location on the pdf file? – Tim Jul 24 '12 at 22:32
  • @Tim: Put one picture in the background and put the other on top of it; the picture environment and the textpos package can do that. I suggest to take your question to tex.stackexchange.com . – Martin Schröder Jul 25 '12 at 5:48
  • There you go – Tim Jul 25 '12 at 11:38
  • 1
    Very lazy answer, would downvote if I could. – Ayberk Özgür May 1 '20 at 11:25

I've had a reasonably good experience with uPdf.


sudo add-apt-repository ppa:atareao/updf
sudo apt-get update
suod apt-get install -y updf

Then fix a bug by editing 2 lines in a Python script.


Launch uPdf, select the Add an image tool, draw a rectangle around the area where you want the signature to go and select the image file with your signature. A PNG with a transparent background works best.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.