LaTeX forum ⇒ Graphics, Figures & TablesUser form + tabularx = interactive PDF?

Information and discussion about graphics, figures & tables in LaTeX documents.
comandos
Posts: 4
Joined: Sat Dec 15, 2018 3:46 pm

User form + tabularx = interactive PDF?

Postby comandos » Mon Oct 28, 2019 3:19 pm

Greetings,
Are tabularx and form package compatible?
I am trying to create a TextField that the user fills when he/she receives the PDF, but I’m having problems aligning them :/

My current table looks like this (without user input)
Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. \documentclass{article}
  2.  
  3. \usepackage[slovene]{babel}
  4. \usepackage[utf8]{inputenc}
  5. \usepackage[useregional=numeric]{datetime2}
  6. \usepackage[left=1in, right=0.5in, bottom=1.0in, top=0.65in]{geometry}
  7. \setlength\parindent{0pt}
  8. \pagenumbering{gobble}
  9. \usepackage{tabularx}
  10. \usepackage{hyperref}
  11.  
  12. \begin{document}
  13.  
  14. \textbf{user input}
  15. \bigskip
  16. \bigskip
  17.  
  18. \begingroup
  19. \setlength{\tabcolsep}{10pt} % Default value: 6pt
  20. \renewcommand{\arraystretch}{1.5}
  21.  
  22. \begin{Form}
  23. \begin{tabularx}{\textwidth}{|l|X|}
  24.  
  25. \hline
  26. Ime: & \\ \hline
  27. Priimek: & \\ \hline
  28. Geslo za neki lepega: & \\ \hline
  29. Rojstni datum: & \\ \hline
  30. Državljanstvo: & \\ \hline
  31.  
  32.  
  33. \end{tabularx}
  34. \end{Form}
  35. \endgroup
  36. \end{document}


And my pathetic attempts on aligning the text fields
Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. \begin{center}
  2. \begin{Form}[]
  3. \begin{tabular}{l}
  4. \TextField{Name} \\\\
  5. \TextField{Stopnja izobrazbe:} \\\\
  6. \end{tabular}
  7. \end{Form}
  8. \end{center}


What I would like to achieve is a fillable PDF that looks like the first table (with tabularx) so the user input field is expanded to cover the full row and that the tabularx table is visible (textfeild has no red edge).

Return to “Graphics, Figures & Tables”

Who is online

Users browsing this forum: No registered users and 2 guests