Skip to content
Advertisement

Fill pdf form image field with image

I have tried to use pdftk to fill a PDF form with text and images. Filling out text fields works fine, but it cant seem to add an image to an PDF form image field.

Is there any way to add an image to a form field with pdftk ? Or any other way to do this?

Heres my pdf: https://easyupload.io/b1emej

Heres my code

JavaScript

Advertisement

Answer

It is possible to carry an image via FDF however the aim of Forms Data is to carry simple text objects such as text field entries or other comments. So for an image it needs to be as separate annotation stamp and unsure if that can be attached to a field as such.

Here is a stamp added to the “clean” file ( note it is “under” the field entries)

enter image description here

JavaScript

The image could be a signature and perhaps the stream be converted to a textual stream for simple text transfer or text templating without binary content.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement