| 1 |
\documentclass{article} |
| 2 |
%\usepackage[designv,forcolorpaper,tight*]{web} |
| 3 |
\usepackage{hyperref} |
| 4 |
\usepackage{forms16be} |
| 5 |
|
| 6 |
\defUniStr{VDV}{\u03B1 cos(\u03B8)} |
| 7 |
\defUniStr{TU}{Don \u\EURO Story "\u03B1 cos(\u03B8)"} |
| 8 |
|
| 9 |
\makeatletter |
| 10 |
% Define two new keys udefault and uvalue to take big-endian values |
| 11 |
\define@key{Field}{udefault}{% |
| 12 |
\def\Fld@udefault{#1}% |
| 13 |
} |
| 14 |
\define@key{Field}{uvalue}{% |
| 15 |
\Hy@pdfstringdef\Fld@uvalue{#1}% |
| 16 |
} |
| 17 |
\let\Fld@udefault\ltx@empty |
| 18 |
\let\Fld@uvalue\@empty |
| 19 |
\def\PDFForm@Text{% |
| 20 |
/Subtype/Widget% |
| 21 |
\Fld@annotflags |
| 22 |
\Fld@pageobjref |
| 23 |
\Fld@annotnames |
| 24 |
/FT/Tx% |
| 25 |
\Fld@flags |
| 26 |
/Q \Fld@align |
| 27 |
/BS<</W \Fld@borderwidth\space /S /\Fld@borderstyle>>% |
| 28 |
\ifcase0\ifnum\Fld@rotation=\z@ \else 1\fi |
| 29 |
\ifx\Fld@bordercolor\relax\else 1\fi |
| 30 |
\ifx\Fld@bcolor\relax \else 1\fi |
| 31 |
\space |
| 32 |
\else |
| 33 |
/MK<<% |
| 34 |
\ifnum\Fld@rotation=\z@ |
| 35 |
\else |
| 36 |
/R \Fld@rotation |
| 37 |
\fi |
| 38 |
\ifx\Fld@bordercolor\relax |
| 39 |
\else |
| 40 |
/BC[\Fld@bordercolor]% |
| 41 |
\fi |
| 42 |
\ifx\Fld@bcolor\relax |
| 43 |
\else |
| 44 |
/BG[\Fld@bcolor]% |
| 45 |
\fi |
| 46 |
>>% |
| 47 |
\fi |
| 48 |
/DA(/Helv \strip@pt\Fld@charsize\space Tf% |
| 49 |
\ifx\Fld@color\@empty\else\space\Fld@color\fi)% |
| 50 |
% Determine which key to used based on uvalue and udefault |
| 51 |
\ifx\Fld@udefault\ltx@empty |
| 52 |
/DV(\Hy@escapestring{\Fld@default})\else |
| 53 |
/DV<\Hy@escapestring{\Fld@udefault}>\fi |
| 54 |
\ifx\Fld@uvalue\@empty |
| 55 |
/V(\Hy@escapestring{\Fld@value})\else |
| 56 |
/V<\Hy@escapestring{\Fld@uvalue}>\fi |
| 57 |
\Fld@additionalactions |
| 58 |
\ifnum\Fld@maxlen>\z@/MaxLen \Fld@maxlen \fi |
| 59 |
} |
| 60 |
\makeatother |
| 61 |
|
| 62 |
\def\cs#1{\texttt{\char`\\#1}} |
| 63 |
\let\pkg\textsf |
| 64 |
|
| 65 |
\parindent0pt \parskip6pt |
| 66 |
|
| 67 |
\begin{document} |
| 68 |
\begin{Form} |
| 69 |
|
| 70 |
The \pkg{hyperref} package does not support initializing form fields with big-endian, but it is possible |
| 71 |
to modify some \pkg{hyperref} core code to get the desired result. The maintainer can take this example |
| 72 |
and generalize it to all appropriate form fields and properties, it there is a demand. |
| 73 |
|
| 74 |
\def\LayoutTextField#1#2{#2} |
| 75 |
\TextField[uvalue={\unicodeStr(VDV)},udefault={\unicodeStr(VDV)}]{textfield} |
| 76 |
|
| 77 |
\end{Form} |
| 78 |
\end{document} |