summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/forms16be/examples
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-08-27 23:54:58 +0000
committerKarl Berry <karl@freefriends.org>2017-08-27 23:54:58 +0000
commit08429b2ebce33f39aef9d2efa79a08bd4e1b495f (patch)
tree7eb30895b78ecee7c5e9bc697705b1ad873edb60 /Master/texmf-dist/doc/latex/forms16be/examples
parent61504dfcae20a500f64c498a1c4671381e3336ec (diff)
forms16be (27aug17)
git-svn-id: svn://tug.org/texlive/trunk@45143 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/forms16be/examples')
-rw-r--r--Master/texmf-dist/doc/latex/forms16be/examples/forms16b3-ap.tex59
-rw-r--r--Master/texmf-dist/doc/latex/forms16be/examples/forms16b3-ef.pdfbin0 -> 572468 bytes
-rw-r--r--Master/texmf-dist/doc/latex/forms16be/examples/forms16b3-ef.tex46
-rw-r--r--Master/texmf-dist/doc/latex/forms16be/examples/forms16b3-hy.tex78
4 files changed, 183 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/forms16be/examples/forms16b3-ap.tex b/Master/texmf-dist/doc/latex/forms16be/examples/forms16b3-ap.tex
new file mode 100644
index 00000000000..b036669ffcf
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/forms16be/examples/forms16b3-ap.tex
@@ -0,0 +1,59 @@
+\documentclass{article}
+\usepackage{amsmath}
+
+\usepackage[
+ useacrobat,
+ web={designv,forcolorpaper,tight*},
+ eforms,
+% The next two option require dvips/Distiller workflow
+% linktoattachments,
+% attachsource=tex
+]{aeb_pro}
+\usepackage{forms16be}
+
+\def\cs#1{\texttt{\char`\\#1}}
+\let\pkg\textsf
+\let\opt\texttt
+\let\app\textsf
+
+\parindent0pt \parskip6pt
+
+\begin{document}
+
+This file uses \pkg{aeb\_pro}, which assumes the document author uses \app{Acrobat}. When the \opt{linktooption}
+is used, \pkg{forms16be} is automatically included, but \app{dvips/Distiller} must be used as the PDF creator. However,
+if you don't want to attach or link to files, then simply say \verb~\usepackage{forms16be}~, as is done in this
+file, but specify the \opt{useacrobat} for \pkg{aeb\_pro}. The latter is how this source file is configured. As a
+user of \app{pdflatex}, \app{lualatex}, or \app{xelatex}, you can build this source file if you have \app{Acrobat} as your default
+PDF viewer.
+
+Initialize a text field using unicode character strings,
+
+\defUniStr{VDV}{\u03B1 cos(\u03B8)}
+\defUniStr{TU}{Don \u\EURO Story "\u03B1 cos(\u03B8)"}
+
+\textField[\TU{\unicodeStr(TU)}\DV{\unicodeStr(VDV)}\V{\unicodeStr(VDV)}]{tst}{1.5in}{11bp}\olBdry
+\pushButton[\CA{\unicodeStr(VDV)}\AAmouseup{app.alert("Initialized to \\"\\u03B1 cos(\\u03B8)\\"");}]{btn}{1in}{11bp}\cgBdry[1em]
+\pushButton[\CA{Reset}\AAmouseup{this.resetForm();}]{reset}{}{11bp}
+
+Note the JavaScript alert message, we use the same markup as for \cs{defUniStr}, but use \cs{\cs{uXXXX}} rather than \cs{uXXXX}. See the source file.
+
+Initialize a combo box using unicode character strings.
+
+\defUniStr{myEuro}{\u20AC (Euro)}
+\defUniStr{myYen}{\u00A5 (Yen)}
+\defUniStr{mySheqel}{\u20AA (Sheqel)}
+\defUniStr{myPound}{\u00A3 (Pound)}
+\defUniStr{myFranc}{\u20A3 (Franc)}
+
+\comboBox[\Ff\FfEdit\DV{Euro}\V{Euro}\textFont{Arial}
+\BG{0.98 0.92 0.73}\BC{0 .6 0}]{myCombo}{1in}{11bp}
+{*{[(Euro)<\unicodeStr(myEuro)>]%
+ [(Yen)<\unicodeStr(myYen)>]%
+ [(Sheqel)<\unicodeStr(mySheqel)>]%
+ [(Pound)<\unicodeStr(myPound)>]%
+ [(Franc)<\unicodeStr(myFranc)>]}
+}
+
+\end{document}
+
diff --git a/Master/texmf-dist/doc/latex/forms16be/examples/forms16b3-ef.pdf b/Master/texmf-dist/doc/latex/forms16be/examples/forms16b3-ef.pdf
new file mode 100644
index 00000000000..8c558630f37
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/forms16be/examples/forms16b3-ef.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/forms16be/examples/forms16b3-ef.tex b/Master/texmf-dist/doc/latex/forms16be/examples/forms16b3-ef.tex
new file mode 100644
index 00000000000..c7bf9e92f57
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/forms16be/examples/forms16b3-ef.tex
@@ -0,0 +1,46 @@
+\documentclass{article}
+\usepackage[designv,forcolorpaper,tight*]{web}
+\usepackage{eforms}
+\usepackage{forms16be}
+
+\previewOff
+
+
+\def\cs#1{\texttt{\char`\\#1}}
+\let\pkg\textsf
+
+\parindent0pt \parskip6pt
+
+\begin{document}
+
+Initialize a text field using unicode character strings,
+
+\defUniStr{VDV}{\u03B1 cos(\u03B8)}
+\defUniStr{TU}{Don \u\EURO Story "\u03B1 cos(\u03B8)"}
+
+\textField[\TU{\unicodeStr(TU)}\DV{\unicodeStr(VDV)}\V{\unicodeStr(VDV)}]{tst}{1.5in}{11bp}\olBdry
+\pushButton[\CA{\unicodeStr(VDV)}\AAmouseup{app.alert("Initialized to \\"\\u03B1 cos(\\u03B8)\\"");}]{btn}{1in}{11bp}\cgBdry[1em]
+\pushButton[\CA{Reset}\AAmouseup{this.resetForm();}]{reset}{}{11bp}
+
+Note the JavaScript alert message, we use the same markup as for
+\cs{defUniStr}, but use \cs{\cs{uXXXX}} rather than \cs{uXXXX}. See the
+source file.
+
+Initialize a combo box using unicode character strings.
+
+\defUniStr{myEuro}{\u20AC (Euro)}
+\defUniStr{myYen}{\u00A5 (Yen)}
+\defUniStr{mySheqel}{\u20AA (Sheqel)}
+\defUniStr{myPound}{\u00A3 (Pound)}
+\defUniStr{myFranc}{\u20A3 (Franc)}
+
+\comboBox[\Ff\FfEdit\DV{Euro}\V{Euro}\textFont{Arial}
+\BG{0.98 0.92 0.73}\BC{0 .6 0}]{myCombo}{1in}{11bp}
+{*{[(Euro)<\unicodeStr(myEuro)>]%
+ [(Yen)<\unicodeStr(myYen)>]%
+ [(Sheqel)<\unicodeStr(mySheqel)>]%
+ [(Pound)<\unicodeStr(myPound)>]%
+ [(Franc)<\unicodeStr(myFranc)>]}
+}
+
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/forms16be/examples/forms16b3-hy.tex b/Master/texmf-dist/doc/latex/forms16be/examples/forms16b3-hy.tex
new file mode 100644
index 00000000000..269042aab25
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/forms16be/examples/forms16b3-hy.tex
@@ -0,0 +1,78 @@
+\documentclass{article}
+%\usepackage[designv,forcolorpaper,tight*]{web}
+\usepackage{hyperref}
+\usepackage{forms16be}
+
+\defUniStr{VDV}{\u03B1 cos(\u03B8)}
+\defUniStr{TU}{Don \u\EURO Story "\u03B1 cos(\u03B8)"}
+
+\makeatletter
+% Define two new keys udefault and uvalue to take big-endian values
+\define@key{Field}{udefault}{%
+ \def\Fld@udefault{#1}%
+}
+\define@key{Field}{uvalue}{%
+ \Hy@pdfstringdef\Fld@uvalue{#1}%
+}
+\let\Fld@udefault\ltx@empty
+\let\Fld@uvalue\@empty
+\def\PDFForm@Text{%
+ /Subtype/Widget%
+ \Fld@annotflags
+ \Fld@pageobjref
+ \Fld@annotnames
+ /FT/Tx%
+ \Fld@flags
+ /Q \Fld@align
+ /BS<</W \Fld@borderwidth\space /S /\Fld@borderstyle>>%
+ \ifcase0\ifnum\Fld@rotation=\z@ \else 1\fi
+ \ifx\Fld@bordercolor\relax\else 1\fi
+ \ifx\Fld@bcolor\relax \else 1\fi
+ \space
+ \else
+ /MK<<%
+ \ifnum\Fld@rotation=\z@
+ \else
+ /R \Fld@rotation
+ \fi
+ \ifx\Fld@bordercolor\relax
+ \else
+ /BC[\Fld@bordercolor]%
+ \fi
+ \ifx\Fld@bcolor\relax
+ \else
+ /BG[\Fld@bcolor]%
+ \fi
+ >>%
+ \fi
+ /DA(/Helv \strip@pt\Fld@charsize\space Tf%
+ \ifx\Fld@color\@empty\else\space\Fld@color\fi)%
+% Determine which key to used based on uvalue and udefault
+\ifx\Fld@udefault\ltx@empty
+ /DV(\Hy@escapestring{\Fld@default})\else
+ /DV<\Hy@escapestring{\Fld@udefault}>\fi
+\ifx\Fld@uvalue\@empty
+ /V(\Hy@escapestring{\Fld@value})\else
+ /V<\Hy@escapestring{\Fld@uvalue}>\fi
+ \Fld@additionalactions
+ \ifnum\Fld@maxlen>\z@/MaxLen \Fld@maxlen \fi
+}
+\makeatother
+
+\def\cs#1{\texttt{\char`\\#1}}
+\let\pkg\textsf
+
+\parindent0pt \parskip6pt
+
+\begin{document}
+\begin{Form}
+
+The \pkg{hyperref} package does not support initializing form fields with big-endian, but it is possible
+to modify some \pkg{hyperref} core code to get the desired result. The maintainer can take this example
+and generalize it to all appropriate form fields and properties, it there is a demand.
+
+\def\LayoutTextField#1#2{#2}
+\TextField[uvalue={\unicodeStr(VDV)},udefault={\unicodeStr(VDV)}]{textfield}
+
+\end{Form}
+\end{document}