TextField 没有显示在应该显示的位置

TextField 没有显示在应该显示的位置

我想使用 Latex 创建传单。所以我打算用一张可折叠的 DinA5 页纸。但我还打算使用稍作修改的版本作为可填写的在线版本。计划是使用可填写的框。但一切都失败了,因为框没有出现在我希望它们出现的位置。我希望它们出现在描述旁边(说明要在其中输入什么)。目前,它们出现在实际纸张上方约 5 厘米处。查看此内容的最佳方式是使用 Adope 阅读器,因为它可以正确显示它们。Foxit 和 Texmaker 的入站阅读器仅在我创建一堆文本框时显示它们,以便将它们推入正常页面并因此变得可见。框以正确的方式彼此对齐,但根本没有与文本对齐。

\documentclass{article}
\usepackage{pgfpages}
\usepackage{array}
\usepackage{xcolor}
\usepackage{hyperref}
\pgfpagesuselayout{2 on 1}[a4paper,landscape,border shrink=5mm]
\usepackage[a4paper , left=2cm, right=2cm, top=1.3cm]{geometry}
\usepackage[ngerman]{babel}
\usepackage{graphicx}   
\usepackage{float}  

\usepackage[T1]{fontenc}\newcommand{\changefont}[3]{\fontfamily{#1} \fontseries{#2} \fontshape{#3} \selectfont}

\usepackage{eso-pic}
\AddToShipoutPicture{%
  \AtTextCenter{%
    \setlength{\fboxsep}{4mm}
    \setlength{\fboxrule}{.5mm}
    \makebox(0,0)[c]{%
      \fbox{\rule{0pt}{\textheight}\rule{\textwidth}{0pt}}% Rahmen
    }%
  }
}



\begin{document}
\pagenumbering{gobble}


\textbf{  Informationen über den Teilnehmer }  \\
\raggedright
\TextField[name=Vorname, width=8cm,  bordercolor={green}, borderstyle=D, value={}]{Vorname:}

  \TextField[name=Nachname,width=5cm,  bordercolor={red}, borderstyle=D,
value={Muster}, backgroundcolor=lightgray]{Nachname:}   \\ 


\TextField[name=Straße,width=5cm,  bordercolor={gray}, borderstyle=D, value={}]{Stra\ss e:}
 \TextField[name=PLZ,width=2cm,  bordercolor={gray}, borderstyle=D, value={}]{PLZ:} \\ 

\end{document}

Adobe 中显示的问题图片

答案1

在此处输入图片描述

\documentclass[a4paper]{book}
%Language
\usepackage[ngerman]{babel}
%Fonts
\usepackage[T1]{fontenc}
\newcommand{\changefont}[3]{\fontfamily{#1} \fontseries{#2} \fontshape{#3} \selectfont}
%Layout
\usepackage[]{multicol} % better than two column as it easily 'wraps' second column
\usepackage[landscape, top=1.3cm,left=2cm,right=2cm]{geometry} % outer margins
\setlength{\columnsep}{4cm} % inner margin = double outer

% AVOID \usepackage{pgfpages} % AVOID 
% AVOID \pgfpagesuselayout{2 on 1}[border shrink=5mm]
% Enhancements
\usepackage{graphicx}   
\usepackage{xcolor}
% Handling
\usepackage{float} % multicol may require the H mod­i­fier of the float pack­age
\usepackage{array}

\usepackage{eso-pic}
\AddToShipoutPicture{%
  \AtTextCenter{%
    \setlength{\fboxsep}{4mm}
    \setlength{\fboxrule}{.5mm}
    \makebox(-435,0)[c]{%
      \fbox{\rule{0pt}{\textheight}\rule{0.4\textwidth}{0pt}}% Rahmen
    }%
    \makebox(410,0)[c]{%
      \fbox{\rule{0pt}{\textheight}\rule{0.4\textwidth}{0pt}}% Rahmen
    }%
  }
}

% Hyperref last before glossaries
\usepackage{hyperref}

\makeatletter 
\def\flushboth{% recommended de-ragged (\justifying) command from https://texfaq.org/FAQ-flushboth
  \let\\\@normalcr
  \@rightskip\z@skip \rightskip\@rightskip
  \leftskip\z@skip
  \parindent 1.5em\relax}
\makeatother

\usepackage{lipsum} % for mwe demonstration only

\begin{document} \begin{multicols}{2}
\pagenumbering{gobble}

\textbf{  Informationen über den Teilnehmer }\\

\raggedright
\TextField[name=Vorname, width=8cm, bordercolor={green}, borderstyle=D, value={}]{Vorname:}\newline
\TextField[name=Nachname, width=5cm, bordercolor={red}, borderstyle=D, value={Muster}, backgroundcolor=lightgray]{Nachname:}\newline
\TextField[name=Straße, width=5cm, bordercolor={gray}, borderstyle=D, value={}]{Stra\ss e:}
\TextField[name=PLZ, width=2cm, bordercolor={gray}, borderstyle=D, value={}]{PLZ:}\newline

\flushboth % =justifying
\vspace{0.5cm}
\lipsum [1-4]

 \end{multicols} \end{document}

相关内容