我正在尝试使用电子表格创建可以应用数字签名的 PDF。每个文档可能都有多个数字签名字段,这样文档就可以在人与人之间传递。我在锁定数字签名中的字段。我尝试使用代码,但包xcolor
似乎无法正常工作
\documentclass{article}
\usepackage{varwidth}
\usepackage{hyperref}
\usepackage[pdftex]{eforms}
\usepackage{xcolor}
\usepackage{xifthen}
\def\colFeat{blue!50!black} %Feature Color 1 for Main Color Theme.
\usepackage{eforms}
\makeatletter
\def\eq@SigField{%
\centerWidget\eq@rectH%
\if\autoCenter n\eqcenterWidget=0pt\fi%
\leavevmode\hbox{\pdfstartlink user{\common@SigFieldCode}%
\lower\eqcenterWidget\Bbox{\eq@rectW}{\eq@rectH}\pdfendlink%
}%
\endgroup%
}
\makeatother
\newcommand{\mySigField}[5]{
\begin{varwidth}{#2}
\textcolor{\colFeat}{
\fcolorbox{black!5!white}{black!5!white}{
\ifthenelse{\equal{#4}{}}%
{\ifthenelse{\equal{#5}{}}%
{\sigField[\Lock{/Action/Include/Fields [(name#1)(pos#1)]}]{#1}{#2}{#3}}%
{\sigField[\Lock{/Action/Include/Fields [(name#1)]}]{#1}{#2}{#3}}%
}%
{\ifthenelse{\equal{#5}{}}%
{\sigField[\Lock{/Action/Include/Fields [(pos#1)]}]{#1}{#2}{#3}}%
{\sigField{#1}{#2}{#3}}%
}%
}\\[1mm]
\rule{#2+3mm}{2pt}\\[2mm]
\begin{tabular}{rl}
\raggedleft Name: & \ifthenelse{\equal{#4}{}}{\TextField[name=name#1,width=6cm]{}}{#4}\\\\[-3mm]
\raggedleft Position: & \ifthenelse{\equal{#5}{}}{\TextField[name=pos#1,width=6cm]{}} {#5}
\end{tabular}
}
\end{varwidth}
}
\begin{document}
\section{Example of No Related Fields}
\mySigField{}{\WS}{\HS}{John Smith}{Garbo}
\end{document}
我的目标是让它像下图这样工作:
有人可以提供一些关于我如何去上班的见解吗?
非常感谢您的帮助。