![]() sign.sh origin signature.png 10 400 690 a png of your signature, somewhere in the pdf, you run the script like this: Given some pdf called origin.pdf you want to add an image, e.g. I'm not sure if this might also work for multipage pdf's. Inspired by the answer from bodo I created a simplified version in hope others can reuse/modify this easily for their purpose to sign a single page pdf. ![]() Pdftk $f.signed.pdf output $f.signenc.pdf user_pw PROMPT owner_pw $(openssl rand -base64 32) allow AllFeatures Pdftk $f.$page.pdf stamp $f.$ output $f.$Įcho "You have to click two times. Size=$(identify -format "%wx%h" $f.$page.pdf)ĭisplay -density $sdatax$sdata -immutable -alpha off -update 1 -debug X11 -log "%e" -title "sign $f.pdf#$page" $f.$ 2>&1 >/dev/null | \ Pdftk $f.pdf cat $page output $f.$page.pdf Identity=$(identify -format "%w,%h,%x,%y" signature.png)Įcho "Please give the signature area with two clicks and finish by pressing ‘q’!" Wipe $f.$ $f.$ $f.signed.pdf signature.pngĮcho "Signing document $f.pdf on page $page." Pagecount=$(pdftk $f.pdf dump_data | grep NumberOfPages | sed "s/.*: //") #dependencies: pdftk, ImageMagick, gpg, wipe, opensslīo=0.2 #baseline overlap in relation to y-size of the signature
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |