# Margin of TextField in form

Is there a way to controll the margin of a TextField placed within a table-structured form ? According to the manual of package 'hyperref', there is a parameter 'bordersep', but it doesn't change anything at all. For the TextFields in the first line in the example below, parameter 'bordersep=10pt' is set - but it has no effect at all:

\documentclass[10pt,a4paper,footexclude, headexclude]{scrartcl}

\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{hyperref}
\usepackage{multirow,booktabs}
\usepackage{array}

\begin{document}

\begin{Form}

\section{Some Section}
\begin{tabular}
{
|p{9mm}|p{20mm}|p{20mm}|p{9mm}|p{20mm}|p{20mm}|
}
\hline
\textbf{1.1} & \multicolumn{2}{p{40mm}|}{Some Field 1} & \textbf{1.2} & \multicolumn{2}{p{40mm}|}{Some Field 2}   \\
\hline
~ & \multicolumn{2}{p{40mm}|}{\TextField[width=\linewidth, name=f1, bordersep=10pt]} & ~ & \multicolumn{2}{p{40mm}|}{\TextField[width=\linewidth, name=f2, bordersep=10pt]}   \\
\hline
\textbf{1.3} & \multicolumn{2}{p{40mm}|}{Some Field 3} & \textbf{1.4} & \multicolumn{2}{p{40mm}|}{Some Field 4}   \\
\hline
~ & \multicolumn{2}{p{40mm}|}{\TextField[width=\linewidth, name=f3]} & ~ & \multicolumn{2}{p{40mm}|}{\TextField[width=\linewidth, name=f4]}   \\
\hline
\end{tabular}\par\bigskip

\end{Form}
\end{document}


It would be great to know a way to add some margin/ spacing between the TextField and the inner cell borders. Thanks for any advice.

• What do you call the ‘inner vells borders? The vertical red lines or the table black vertical rules? B. t.w., compiling your code I do not obtain the blue rectangle with the red frame. Dec 24 '19 at 13:18
• EDIT: There are additional (invisible) horizontal lines between the labels (Some Field..) and their corresponding TextField, I made a new screenshot where these lines are visible. On this screenshot it gets more clear what is meant with 'margin/ spacing between the TextField and the inner cell borders': The horizontal lines of the TextFiled's rectangle are lying on the (inner) cells border. The blue background of the rectangle is just the way "Adobe Acroabt Reader DC Version 2015.020.20039" highlights input fields. Dec 24 '19 at 15:20
• bordersep is not used and imho there is nothing in pdf that allows to set the padding. Dec 24 '19 at 15:22

A proper workaround is to set

\hypersetup{pdflinkmargin=-1.0pt}


The above code enhanced by this command produces the result shown on the screenshoot below:

\documentclass[10pt,a4paper,footexclude, headexclude]{scrartcl}

\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{hyperref}
\usepackage{multirow,booktabs}
\usepackage{array}

\begin{document}

\begin{Form}

\section{Some Section}
\begin{tabular}
{
|p{9mm}|p{20mm}|p{20mm}|p{9mm}|p{20mm}|p{20mm}|
}
\hline
\textbf{1.1} & \multicolumn{2}{p{40mm}|}{Some Field 1} & \textbf{1.2} & \multicolumn{2}{p{40mm}|}{Some Field 2}   \\
\hline
~ & \multicolumn{2}{p{40mm}|}{\TextField[width=\linewidth, name=f1, bordersep=10pt]} & ~ & \multicolumn{2}{p{40mm}|}{\TextField[width=\linewidth, name=f2, bordersep=10pt]}   \\
\hline
\textbf{1.3} & \multicolumn{2}{p{40mm}|}{Some Field 3} & \textbf{1.4} & \multicolumn{2}{p{40mm}|}{Some Field 4}   \\
\hline
~ & \multicolumn{2}{p{40mm}|}{\TextField[width=\linewidth, name=f3]} & ~ & \multicolumn{2}{p{40mm}|}{\TextField[width=\linewidth, name=f4]}   \\
\hline
\end{tabular}\par\bigskip

\end{Form}
\end{document}