# Embed hyperref \Form in Tikz picture

Is there any way I can embed a fillable PDF Form from hyperref's \Form (or anything equivalent) in a tikzpicture?

• AFAIK there is no clash between hyperref and TikZ, see e.g. here. Can you please tell us what you tried? – user121799 Oct 7 '18 at 16:19
• @marmot how can I position the Textfield inside the Tikz picture; not just above or below. – Hans Oct 7 '18 at 16:21
• Sorry, I read that on mobile and missed your link. It totally works, just injecting the code into the node name label: \node (Y)[] {label: \TextField[width=4cm]{tfName}{}};. I tried many more complicated things but never tried anything as simple! Thanks! Would you rewrite that as an answer so I can mark it as a solution? – Hans Oct 7 '18 at 17:22
• @marmot I think the purpose of Jake's method is to insert a PDF annotation (e. g. a link) whose size will be dictated by the BBox of the TikZ node into which it is inscribed. The request made here is simpler; as the size of the TikZ node simply derives from the PDF annotation size. – AlexG Oct 7 '18 at 19:06
• @AlexG Yes, that's why it is good that you (and not I) answered that question. ;-) +1 – user121799 Oct 7 '18 at 19:59

Indeed, there is nothing special about \TextField in a tikzpicture environment. It can be inserted in the text argument of a TikZ node:

\documentclass{article}
\usepackage{hyperref}
\usepackage{tikz}

\makeatletter
\newcommand\fntSize{\f@size pt} %current font size
\makeatother

\begin{document}
\begin{Form}

\begin{tikzpicture}

\node (A) [inner sep=0pt, outer sep=0pt] {\TextField[width=4cm, charsize=\fntSize, name=tfNameA]{label A:}};

\node [inner sep=0pt, outer sep=0pt, below of=A] {\Huge\TextField[width=4cm, charsize=\fntSize, name=tfNameB]{label B:}};

\end{tikzpicture}

\end{Form}
\end{document}