2

First of all, I am a TeX-Noob, so this may be easy answered by a pro ;-)

We have MiKTeX 2.9 and pdfLaTeX for creating pdf documents.

One pdf document contains multiple form fields (TextField), and one specific form field has to be a barcode. A code39.ttf font is installed in the system.

\documentclass[ngerman,oneside]{scrreprt}
\usepackage{xcolor}
\setlength\paperheight{55mm}
\setlength\paperwidth{85mm}
\usepackage[left=0mm,top=0mm,bottom=0mm,right=0mm]{geometry}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\renewcommand{\familydefault}{phv}
\newcommand{\transparentTextfield}[2]{\TextField[backgroundcolor={}, bordercolor={}, charsize=14pt, width=#1 ,height=6mm, name=#2]{}}
\usepackage{graphicx}
\usepackage[pdftex,a4paper=true,colorlinks=true,pdftitle={Title},pdfsubject={Subject},pdfauthor={Me},pdfpagemode=UseNone,pdfstartview=FitH,pagebackref,pdfhighlight={/N}]{hyperref}
\begin{document}
\begin{Form}
\begin{picture}(0,0)

\setlength{\unitlength}{1mm} 

\put(2,-10){\TextField[backgroundcolor={}, bordercolor={}, charsize=0pt, width=73mm, height=7mm, name=barcode1]{}}
\put(6.5,-46){\TextField[backgroundcolor={}, bordercolor={}, charsize=8pt, width=12mm ,height=5mm, name=number1]{}}
\put(38,-46){\TextField[backgroundcolor={}, bordercolor={}, charsize=8pt, width=25mm ,height=5mm, name=number2]{}}

\end{picture}
\end{Form}
\end{document}

But how can I set the font of the TextField to my installed code39 font?

My workaround is as follows: After creating the pdf, I open it with Acrobat Professional and change the font of the text field to Code39 manually and save it.

  • 1
    Welcome to TeX.SX! Please make your code compilable, starting with \documentclass{...} and ending with \end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to help you. Help them help you: remove that one hurdle between you and a solution to your problem. – Mensch Jun 10 '13 at 13:21
  • See this answer: http://tex.stackexchange.com/questions/36630/hyperref-how-to-format-text-in-a-forms-text-field – Ulrike Fischer Jun 10 '13 at 15:08

0 Answers0