[pdftex] hyperref PDF-forms

Heiko Oberdiek oberdiek at uni-freiburg.de
Fri Aug 5 00:47:09 CEST 2005


On Thu, Aug 04, 2005 at 04:33:44PM +0200, Ralf Utermann wrote:

> when I use the Form environment from hyperref with pdflatex
> I have problems to build a form with TextFields, where one
> TextField should present a result calculated from the input of
> other TextFields, like:
> 
> \TextField[name=field3,
> keystroke={AFNumber_Keystroke\string\(2, 2, 0, 0, "EUR", true \string\);},
> format={AFNumber_Format\string\(2, 2, 0, 0, "EUR", true \string\);},
> calculate={AFSimple_Calculate("SUM",new Array\string\("field1" , "field2"\string\));}
> ] {field3:  }
> 
> Calculation in the pdf is only done, if I manually add a line to the pdf file
> in the AcroForm object definition to set a calculation order with
> the /CO operator.
> 
> Is there a possibilty to define this already in the TeX-source?

hyperref has no support for changing the AcroForm object.
But you can define your own object:

\usepackage[...]{hyperref}
...
\pdfobject{
  <<
    /Fields []
    ...
  >>
}
\edef\OBJ at acroform{\the\pdflastobj}
...
\begin{Form}
...

Yours sincerely
  Heiko <oberdiek at uni-freiburg.de>
-- 



More information about the pdftex mailing list