1

I am compiling a fillable PDF from TeX with pdfLaTeX. It works fine when looking at the PDF on a Laptop or PC, however, when opening the document from my cellphone with Acrobat Reader or similar PDF readers it is awful.

Especially, it is not possible to use the dropdown menus, neither is it possible to choose the birth date appropriately and the choice boxes display inappropriate symbols.

Does anyone have any advice? It is urgent and I have no idea what to do. Thanks in advance.

\documentclass[a4paper,12pt]{article}
\usepackage{amssymb} % needed for math
\usepackage{amsmath} % needed for math
\usepackage[utf8]{inputenc} % this is needed for german umlauts
\usepackage[ngerman]{babel} % this is needed for german umlauts
\usepackage[T1]{fontenc}    % this is needed for correct output of umlauts in pdf
\usepackage[margin=2.5cm]{geometry} %layout
\usepackage{xcolor}
\usepackage{eurosym}
\usepackage{hyperref}  % this is needed for forms and links within the text



\begin{document}

\title{NEUKUNDEN-FORMULAR}
\author{Oliver Kristen}
\date{\today}

\section{NEUKUNDEN-FORMULAR\\FÜR PERSONENBETREUER:INNEN} \vspace{1.cm}


%\TextField[format   ={AFDate_FormatEx("dd.mm.yyyy");},
   %        keystroke={AFDate_KeystrokeEx("dd.mm.yyyy");},bordercolor=black]{Geburtsdatum}

\begin{Form}[action=mailto:[email protected],encoding=html,method=post]
\subsection{\textbf{Persönliche Daten:}} \vspace{0.3cm}
\begin{tabbing}
\def\labelline#1#2{\lbl{#1}\vbox{\hbox{\TextField[name=vor,width=#2,bordercolor=black]{\null}}\kern2pt\hrule}} 
xxxxxxxxxx: \= \kill  % This is needed for the right tab width
Nachname(n):           \> \TextField[bordercolor=black,name=name,width=5cm,charsize=12pt]
{\mbox{}}
Vorname(n):   \hspace{0.25cm} \TextField[bordercolor=black,name=vor,width=5cm,charsize=12pt]
{\mbox{}} \\[6pt]\\
SV-Nr.:           \> \TextField[bordercolor=black,,maxlen=11,value=xxxx-ddmmyy,name=sv,width=5cm,charsize=12pt,calculate={this.getField('text').value=Number(this.getField('text').value)}]
{\mbox{}}
Geburtsdatum:  \TextField[format   ={AFDate_FormatEx("dd.mm.yyyy");},
           keystroke={AFDate_KeystrokeEx("dd.mm.yyyy");},bordercolor=black,name=date,maxlen=10,value=dd.mm.yyyy,width=5cm,charsize=12pt]
{\mbox{}} \\[6pt]\\

Heimatland:           \>
\ChoiceMenu[bordercolor=black,combo,name=city,width=5cm,charsize=12pt,default=Karlsruhe]{\mbox{}}
{Bulgarien, Rumänien, Slowakei, Tschechien, Ungarn} 
{\mbox{}}
Geschlecht:  
\hspace{0.52cm} \ChoiceMenu[bordercolor=black,radio,radiosymbol=, default=,name=sex,charsize=12pt]{\mbox{}}{Mann=m,Frau=f} \\[6pt]
{\mbox{}} \\[6pt]
Telefon-Nr.:           \> \TextField[bordercolor=black,,maxlen=25,value=00-Country-Code-xxxxx,name=telefon,width=5cm,charsize=12pt,calculate={this.getField('text').value=Number(this.getField('text').value)}]
{\mbox{}}
Email-Adresse:  \TextField[bordercolor=black,name=email,maxlen=40,width=7cm,charsize=12pt]
{\mbox{}} \\[6pt]\\
Kommunikations-Modus\\
\underline{Sprache}:           \>
\ChoiceMenu[bordercolor=black,combo,name=Sprache,width=3.5cm,charsize=12pt,default=Karlsruhe]{\mbox{}}
{Deutsch, Muttersprache (mit Google-Translate), Englisch} 
{\mbox{}}
\underline{Form}:   
\ChoiceMenu[bordercolor=black,radio,radiosymbol=\ding{54}, default=f,name=medium,charsize=12pt]{\mbox{}}{Email=Email,Whatsapp/Viber=Whatsapp} \\[6pt]
{\mbox{}} \\[6pt]\\
\end{tabbing}

%\begin{Form}
  %  \TextField[width=6em,charsize=12pt,maxlen=4,name=text,calculate={this.getField('text').value=Number(this.getField('text').value)}]{Text}
%\end{Form}
\subsection{\textbf{Angefragte Leistungen (Services):}}
%\CheckBox[name=Steuer,charsize=10pt]{Aktuelle Steuererklärung (\euro 150)}
%\CheckBox[name=Steuerkorr,charsize=10pt]{Korrektur Steuerbescheid} \\
%\CheckBox[name=SVS:Korr,charsize=10pt]{SVS-Korrektur (\euro 40-\euro 50) }
%\CheckBox[name=FB,charsize=10pt]{Familienbeihilfe (\euro 40-\euro 50) }
\def\LayoutCheckField#1#2{% label, field
  #2 #1%
}

Wir überprüfen grundsätzlich immer die Voraussetzungen und Möglichkeiten ....
 \vspace{1cm}

  \begin{tabular}{ p{9cm}p{7.5cm}}

    \textbf{Erstmalige Abgabe} & \textbf{Korrekturen}\\
    \mbox{\CheckBox[name=Steuer,bordercolor=black]{Aktuelle Steuererklärung (\euro 150,00/Jahr)}}&   \mbox{\CheckBox[name=KorrSteuer]{Korrektur Steuerbescheid (\euro 150,00/Jahr)}}\\ \\ \\
Jahr(e): \ChoiceMenu[bordercolor=black,combo,name=JahreSteuer,width=5cm,charsize=12pt,default=Karlsruhe]{\mbox{}}
{2022, 2021, 2020, 2019, 2018,2021-2022,2020-2022,2019-2022,2018-2022, 2020-2021,2019-2021,2018-2021,2019-2020,2018-2020,2018-2019} & Jahr(e): \ChoiceMenu[combo,name=KorrJahreSteuer,width=5cm,charsize=12pt,default=Karlsruhe]{\mbox{}}
{2022, 2021, 2020, 2019, 2018,2021-2022,2020-2022,2019-2022,2018-2022, 2020-2021,2019-2021,2018-2021,2019-2020,2018-2020,2018-2019}\\ \\ \\
\scriptsize Die Korrektur der SVS-Beiträge von alten Jahren ist nur durch die Korrektur der alten Steuerbescheide oder durch Abgabe der Steuererklärungen möglich. Nur das aktuelle Jahr (z.B. 2023 in 2023) kann teilweise direkt bei der SVS korrigiert werden (links ''SVS-Korrektur''). \\\scriptsize Daher sind oft  verschiedene Korrekturen gleichzeitig notwendig.& 
 \mbox{\CheckBox[name=korrsvs]{SVS-Korrektur aktuelles Jahr (\euro 40,00)}} \\ \\
   \mbox{\CheckBox[name=FBneu,,bordercolor=black]{Familienbeihilfe-Erstantrag (\euro)}}  &  \mbox{\CheckBox[name=FB,bordercolor=black]{Familienbeihilfe-Folgeantrag (\euro)}}\\
   \mbox{\CheckBox[name=Pension,,bordercolor=black]{Pensionsanträge (\euro)}}  &  \mbox{\CheckBox[name=Fragebogen,bordercolor=black]{Fragebogen Finanzamt (\euro)}}
\\
      \end{tabular}

\Submit{Submit}
\Reset{\textbf{Löschen}}
\hfill ~\\
\end{Form}

\end{document}
4
  • 1
    I have no idea what the android reader supports, but \DocumentMetadata{}\documentclass{article} \usepackage{l3pdffield-testphase}\begin{document} \ExplSyntaxOn \pdffield_choice:n{name=test,values={2021,2022,2023,2024}} \ExplSyntaxOff \end{document} seems to work better. Commented Jun 25, 2023 at 21:21
  • Thank you very much for your answer! Sorry, but I do not quite know how to execute your changes, would you mind posting the entire code with your changes, if you have a minute? Thanks in advance. Commented Jun 26, 2023 at 10:42
  • @HristovaDaniela I think it is a test document rather than a solution. You could potentially use it by putting \DocumentMetadata{} before \documentclass, loading l3pdffield-testphase and converting the commands setting up choice fields. I believe it's a demonstration of getting a choice field to work rather than a fix for what you currently have.
    – cfr
    Commented Nov 23, 2023 at 17:20
  • @HristovaDaniela See answer. Please let me know when you've seen it as I don't want to leave it undeleted since I have no clue.
    – cfr
    Commented Nov 23, 2023 at 17:34

1 Answer 1

0

[Will delete later.]

Here's a minimal adaption using Ulrike Fischer's solution just to demonstrate how you could apply it in your actual document. Note that I don't know what I'm doing, so I'm entirely dependant on Ulrike's authority here. But she does know what she's doing.

\DocumentMetadata{}
\documentclass[a4paper,12pt]{article}
\usepackage{amssymb} % needed for math
\usepackage{amsmath} % needed for math
\usepackage[utf8]{inputenc} % this is needed for german umlauts
\usepackage[ngerman]{babel} % this is needed for german umlauts
\usepackage[T1]{fontenc}    % this is needed for correct output of umlauts in pdf
\usepackage[margin=2.5cm]{geometry} %layout
\usepackage{xcolor}
\usepackage{eurosym}
\usepackage{hyperref}  % this is needed for forms and links within the text

\usepackage{l3pdffield-testphase}


\begin{document}
\title{NEUKUNDEN-FORMULAR}
\author{Oliver Kristen}
\date{\today}

\section{NEUKUNDEN-FORMULAR\\FÜR PERSONENBETREUER:INNEN} \vspace{1.cm}

\begin{Form}[action=mailto:[email protected],encoding=html,method=post]
\subsection{\textbf{Persönliche Daten:}} \vspace{0.3cm}
\begin{tabbing}
  \def\labelline#1#2{\lbl{#1}\vbox{\hbox{\TextField[name=vor,width=#2,bordercolor=black]{\null}}\kern2pt\hrule}} 
  xxxxxxxxxx: \= \kill  % This is needed for the right tab width
  Nachname(n):           \> \TextField[bordercolor=black,name=name,width=5cm,charsize=12pt]
  {\mbox{}}
  Vorname(n):   \hspace{0.25cm} \TextField[bordercolor=black,name=vor,width=5cm,charsize=12pt]
  {\mbox{}} \\[6pt]\\
  SV-Nr.:           \> \TextField[bordercolor=black,,maxlen=11,value=xxxx-ddmmyy,name=sv,width=5cm,charsize=12pt,calculate={this.getField('text').value=Number(this.getField('text').value)}]
  {\mbox{}}
  Geburtsdatum:  \TextField[format   ={AFDate_FormatEx("dd.mm.yyyy");},
  keystroke={AFDate_KeystrokeEx("dd.mm.yyyy");},bordercolor=black,name=date,maxlen=10,value=dd.mm.yyyy,width=5cm,charsize=12pt]
  {\mbox{}} \\[6pt]\\
  
  Heimatland:           \>
  \ExplSyntaxOn\pdffield_choice:n{name=city,bordercolor=black,width=5cm,default=Karlsruhe,values={Bulgarien, Rumänien, Slowakei, Tschechien, Ungarn}}\ExplSyntaxOff

\end{tabbing}
\end{Form}

\end{document}

I selected the options for \pdffield_choice:n by adding yours and subtracting the ones which gave me errors.

form output

You must log in to answer this question.

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