0

I have a signature image and want to add first the current date before it (on the left side) and then add this signature with date together to an existing pdf. The existing pdf is an application form with an area for the signature and date.

What I have done so far is:

magick \( -size 450x -gravity west -font NimbusSans-Regular label:23.10.2019 \) signature.png +append -strip -quality 100 signaturewithdate.png

^This adds the current date before the signature, works.

Afterwards I convert the signature image with date to a "layer pdf" and put the signature image with date to the right position:

magick signaturewithdate.png -resize 400x25 -transparent white -page A4+330+180 stamp.pdf

Afterwards I use pdftk to join the original application form pdf and the signature with date pdf:

pdftk original.pdf stamp stamp.pdf output final.pdf

My problem is now, that the signature with date in the pdf is not sharp enough, its losing the sharpness. How I can make the signature with date sharp?

You find the original pdf here: https://gofile.io/?c=COkXUr

Christian
  • 11
  • 2
  • You need to create the pdf files at the same density before merging or they will not match. The PDF with the signature is really a raster image in a PDF shell. So its quality is defined by the size of the signature image that you create, which is 400x25. So its quality will not be very good due to the resize output size. It is not like a vector signature that scales with good quality. I am not sure you can improve this unless you can add the signature raster file directly into your form PDF rasterized at a high density. Please post your form PDF so we can test with it. – fmw42 Oct 23 '19 at 00:14
  • You find the original pdf here: https://gofile.io/?c=COkXUr – Christian Oct 23 '19 at 00:20
  • The PDF created by using Imagemagick and resize will be blurry, because it is a raster image in a PDF vector shell. Imagemagick will not created a pure vector PDF. I do not know how you can improve your result apart from adding some sharpening after resizing or better creating the image at the size you want by using -size x25 or -size 400x. Otherwise you would need to vectorize the signaturewithdate.png before including it into your final PDF. Or find some other tool apart from Imagemagick that can insert vector text directly into your vector PDF file. – fmw42 Oct 23 '19 at 00:53
  • Which one I have to use: -sharpen or -unsharp or -adaptive-sharpen? And which radius x sigma would be the best? – Christian Oct 23 '19 at 22:59
  • Try them all and play with the values. I cannot tell you without trying myself. But I suspect you will need to find some other tool besides Imagemagick and vectorize your signature. – fmw42 Oct 23 '19 at 23:51

0 Answers0