1

The € is not working properly in \TextField in almost all pdf viewers. I have a pdf document where the € sign is working in all pdf viewers, so the assumption is that the implemented \TextField is not working properly.

Proof

As example I am using evince on debian. If i click on a text field then all the text in the box is selected but the old text does not disappear (I assume that this is the default behavior of evince on debian):

enter image description here

If I input "is it working€?" in the properly implemented text field of the external pdf I get the behavior:

enter image description here

If I input "is it working€?" in the document created by

\documentclass{article}
\usepackage[utf8x]{inputenc}

\usepackage{hyperref}
\begin{document}
    \begin{Form}
        \TextField{}
    \end{Form}
\end{document}

then I get the behavior:

enter image description here

so the € is working in "writing mode", but not in "reading mode".

Question

How do I get the € working like the external pdf document?

1
  • If you want to replicate a properly working text field in pdf you can use for example "Master PDF Editor". Commented Jun 15, 2020 at 17:26

1 Answer 1

2

The euro is missing in the encoding declaration. You can patch hyperref like this:

\documentclass{article}
\usepackage{hyperref}
\usepackage{xpatch}

\makeatletter
\patchcmd\Hy@FormObjects{164/currency}{160/Euro 164/currency}{}{\fail}
\makeatother

\begin{document}
    \begin{Form}
        \TextField{name}
    \end{Form}
\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .