0

I am trying to create a writable pdf and I took a cue from here: Creating fillable PDFs and What are the miminal required environments for a KOMA-Script scrlttr2?

I don't understand how to arrange things well so that it is easy and intuitive for those who have to use it. The code I am using is definitely not correct. would you have any suggestions?

\documentclass[%
  fontsize=11pt,
  parskip=half,%%
% fromalign=right,% right,locationright %% <============================
  firsthead=true, % <===================================================
  fromphone=on,%%
  fromfax=on,%%
  fromrule=aftername,%%
  fromemail=on,%%
  fromlogo=true,%%
  foldmarks=false,%%
  firstfoot=false,%%
  subject=titled,%%
  pagenumber=botright,%%
  headsepline=true, % <=================================================
  DIN
]{scrlttr2}

\usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[italian,english]{babel} \usepackage{url} \usepackage{graphicx} \usepackage{eurosym} \usepackage{newcent} \usepackage{lipsum} \usepackage{selinput} \usepackage{array} \usepackage{hyperref} \usepackage{xcolor} \date{} %% elimina la data

\setkomafont{fromname}{\scshape \LARGE} \setkomafont{backaddress}{\mdseries}

\makeatletter @setplength{firstheadvpos}{7mm} @setplength{firstfootvpos}{265mm}%% \makeatother \setkomavar{firsthead}{\raggedleft % <================================== \usekomavar{fromlogo}\[+1cm] \rule{\textwidth}{0.5pt}\ \usekomavar{fromaddress}\ \usekomavar{fromphone}\ \usekomavar{fromfax}\ \usekomavar{fromemail}\% <=========================================== }

\newdimen\longline \longline=\textwidth\advance\longline-10cm

\def\LayoutTextField#1#2{#2} % override default in hyperref

\def\lbl#1{\hbox to 0.2cm{#1\strut}}% \def\labelline#1#2{\lbl{#1}\vbox{\hbox{\TextField[name=#1,width=#2,bordercolor={white}, backgroundcolor={white}]{}}\kern1pt\hrule}}

\def\q#1{\hbox to \hsize{\labelline{#1}{\longline}}} \def\qq#1{\hbox to \hsize{\labelline{#1}{\longlinee}}}

\begin{document} %-------------------------------------- \setkomavar{fromaddress}{ address\ Street} \setkomavar{fromphone}{Tel: +99,999,99,99,99} \setkomavar{fromemail}{mail:email@blabla.com} \setkomavar{backaddressseparator}{ - } \setkomavar{fromlogo}{\includegraphics[scale=.5]{logos}\vspace{-1.3cm}}

\setkomavar{subject}{ money refund request}

%------------------------------------------------------------------ \begin{letter}{} \opening{} %\def\DefaultHeightofText{12pt} % \begin{Form} %%%%%?????? Il/La Sig. \q nato/a \q il \q residente in \q Via \q, C.F:\q, in qualità di.... \end{Form}

\begin{Form} \mbox{\CheckBox[width=10pt,height=10pt,bordercolor=0 0 0,name=pri]{\ignorespaces}} {legal tutor} \par\ \end{Form}

\begin{Form} \mbox{\CheckBox[width=10pt,height=10pt,bordercolor=0 0 0,name=sec]{\ignorespaces}} {family of reference} \par\ \end{Form}

\begin{Form} \mbox{\CheckBox[width=10pt,height=10pt,bordercolor=0 0 0,name=ter]{\ignorespaces}} {The reimbursement of expenses will be made in the name of\q resident in \q, CF:\q } \par\ \end{Form}

% \opening{Dear Mr. xxxxx xxxxxxxxxx,} % % % \lipsum[1-8] % % % \closing{Regards,} % \setkomavar*{enclseparator}{Enclosure(s)} % % \encl{example enclosure} \end{letter} \end{document}

enter image description here

Antonio
  • 543
  • 1
    there should be only one Form environment by document (actually it should be enough to simply use \Form at the begin). And don't use \def until you really know what you are doing. Use \newcommand or \renewcommand instead. – Ulrike Fischer Nov 03 '20 at 12:48
  • @UlrikeFischer, thanks for the reply, but i can't find the solution. I'm also looking for examples but they all refer to Forms. what I'm doing is a request form so it should be written as if it were a letter. – Antonio Nov 03 '20 at 19:08
  • My comments weren't meant as solution, only as remarks about wrong code in your example. – Ulrike Fischer Nov 03 '20 at 19:10
  • @UlrikeFischer To my great regret, I was unable to conclude this topic, perhaps it does not arouse interest. I have tried to do research but I have not found and according to your suggestion, maybe I am not very good. – Antonio Nov 14 '20 at 18:40
  • well to my liking your question is too long and seems to ask to many questions at once. – Ulrike Fischer Nov 14 '20 at 18:46
  • @UlrikeFischer sorry for the delay in answering, I am a caregiver and I take care of my mother and I have difficulty being quick to answer.

    briefly I would like to understand how to create a pdf that can be compiled with LaTex without having to use other software such as acrobat or other. for me it is a new approach and I do not deny having a lot of difficulty in this regard

    – Antonio Nov 17 '20 at 07:21

0 Answers0