summaryrefslogtreecommitdiff
path: root/Master/texmf-doc/doc/english/pdf-forms-tutorial-en/examples/ex0301.tex
blob: d0b26763c617b1c9ada543297db2ba44c5a3003d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
\documentclass[ngerman,a4paper]{scrartcl}
\usepackage[latin1]{inputenc}
\usepackage{mathptmx}
\usepackage[scaled=.92]{helvet}
\usepackage{courier}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\renewcommand*{\familydefault}{phv}
\usepackage[left=25mm,top=25mm,bottom=10mm,right=10mm]{geometry}
\usepackage{fancyhdr}
\lhead{Test}\chead{}\rhead{inputenc and insdljs}
\lfoot{}\cfoot{}\rfoot{}
\pagestyle{fancy}
\usepackage{graphicx}
\usepackage{color}
\usepackage[
  pdftex,a4paper=true,colorlinks=true,
  pdftitle={insdljs und inputenc},pdfsubject={Test},
  pdfauthor={ich},
  pdfpagemode=UseNone,pdfstartview=FitH,
  pagebackref,pdfhighlight={/N}
]{hyperref}
\usepackage[pdftex]{insdljs}
\begin{insDLJS}[exaada]{exaada}{JavaScript auf Document Level}
// indicate that the function was not yet run
var done = 0;

// text to show when file is opened
var theText =
"Test to show \u00E4\u00F6\u00FC\u00C4\u00D6\u00DC\u00DF";

// function to run when opening the document
function myFirstJavaScriptFunction()
{
  if(!done) {
    done = 1;
    app.alert(theText);
  }
}
\end{insDLJS}
\OpenAction{/S /JavaScript /JS (myFirstJavaScriptFunction();)}
\newcommand{\textforlabel}[2]{%
\TextField[name={#1},value={#2},width=7em,align=2,%
bordercolor={1 1 1},readonly=true]{}%
}
\begin{document}
\section{Testing insdljs and inputenc}
This is a test whether insdljs and inputenc can be used combined.
The pop-up box should show the following german umlauts and ligatures:
\begin{itemize}
\item	ä (ae)
\item	ö (oe)
\item	ü (ue)
\item	Ä (Ae)
\item	Ö (Oe)
\item	Ü (Ue)
\item	ß (sz)
\end{itemize}
\end{document}