Add an image to an existing pdf


I need to add an image and two texts into an existing pdf file.
First of all, I want to know if it is possible with Go.
And it would be great if you could describe a solution or a way to do it (I know how to do it for a new file).

I did some research on the web but I’m French (nobody’s perfect) and it’s not easy for me to sort through the jungle of results.
I’ve seen solutions like Pdftron but I can’t use a paid solution and I prefer open source solutions.
I continue my research but if you could help me…

Many thanks.
Jean Pierre.

This is generally possible.

Though as well you generally do not want to edit PDFs. You either generate them from some non-PDF source or you edit them using a PDF editor. PDF is a nasty to work with container format, and everything with changing it will raise and fall with how the original PDF has been created.


Thank you for answering.

For the PDF format I can not derogate.

I explain my problem.
We are an educational organization who help young people.
We organize professional internships.
We send the internship agreement by email in PDF format.
The company or association sends the return of the signed agreement by email. We store everything in PDF format.
Currently, they print the agreement, sign it manually, scan it, and send the agreement as a PDF or image.
I want to simplify the procedure with a utility that helps them integrate the signature without printing the agreement or having to scan it. Many of them are very small businesses or associations and don’t have a scanner, the return is a picture (make with phone) of the agreement.

I imagine an alternative solution, but I don’t know if it’s good.
Turn PDF into image, merge signature and agreement image. Convert image to PDF. I don’t know how do it at the moment but I’m making research.
The agreement is on 2 pages (front and back).

If you could help me. Not to give me a ready-made solution (although… ;o)) ), but to give me tracks to explore.

Many thanks.

This doesn’t really use Go, but I think you can find wrappers/libraries written in Go to help executing the commands.

Use convert (or any available tool) to convert the image in the PDF.
Then use that PDF to overlay the target PDF document using pdftk’s multistamp operation.

I did this using PHP a few years ago (along with PDFjs and jSignature) make a simple editor for adding signature and annotations to a PDF file.

Keep the print-sign-scan workflow, inserting an image in a file and keeping it there might be considered signature forgery in some legislatives, and just have no legal meaning in others.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.