latex3 / hyperref

Hypertext support for LaTeX
170 stars 36 forks source link

Support for signature fields #335

Open maxnoe opened 8 months ago

maxnoe commented 8 months ago

It would be great if hyperref could support a \SignatureField for digital signatures.

There is some "prior art", see https://tex.stackexchange.com/questions/51090/how-do-i-create-a-pdf-file-that-can-be-digitally-signed

But I didn't find a working solution for me (digsig doesn't render in tests I did, neither in Adobe Acrobat nor in Okular) and eforms seems to be incompatible with hyperref forms.

u-fischer commented 4 months ago

eforms should work find with hyperref, but without example I can't test.

I plan to add some support for signatures to the pdfmanagement-testphase bundle (as addition to l3pdffield,) but I doubt that hyperref itself will get it. Until then you can try something like this

\DocumentMetadata{pdfversion=1.7} %or 2.0

\documentclass[12pt]{report}
\usepackage{l3pdffield-testphase}
\begin{document}
Test signature
\ExplSyntaxOn
\pdffield_field:nn{name=signature,FT=Sig,Q=left}{mysig}
\fbox{\pdffield_annot:n{width=3cm,height=2cm,parent=mysig}}
\ExplSyntaxOff

\end{document}

More keys are in the l3pdffield documentation.