Best Way to Place Image in PDF

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
scolby33
Posts: 4
Joined: 2018-11-25T19:24:42-07:00
Authentication code: 1152

Best Way to Place Image in PDF

Post by scolby33 »

I have an image of my signature (a transparent PNG at 144dpi) that I would like to place in a blank PDF page to be used with PDFtk's stamp functionality. This is the command line I have developed so far:

Code: Select all

magick -density 300 -size 2550x3300 xc:transparent \( signature_transparent.png -resize 90% \) -geometry +150+2604 -composite largesig.pdf
There are several things I don't like about this:
  • do I need the "sub image" in the parentheses?
  • I had to specify -density 300--without it, the signature was very pixelated
  • because of the specified -density, I could not use -page letter--I got pages too small by a factor of 72/300=0.24, so I had to manually calculate the -size geometry
Is this the best way to obtain the intended result?
Post Reply