[pdftex] hyperref PDF-forms
Ralf Utermann
Ralf.Utermann at Physik.Uni-Augsburg.DE
Fri Aug 12 10:35:47 CEST 2005
Heiko Oberdiek wrote:
[...]
>
> If you use \pdfannot, you get the object number by \pdflastannot.
> But \pdflastannot is not set, if \pdfstartlink is used.
> Do you have an example, where you need the object number
> of \pdfstartlink?
Here is my minimal Form example
http://www.physik.uni-augsburg.de/~ralfu/testform.tex
As you suggested, I have created my own \OBJ at acroform object.
This has to be done before \begin{Form}, otherwise the Form
environment creates this object.
If there would be a method to get the Form elements' object numbers,
I would probably only know them after the Form environment, so I
use reserveobjnum/useobjnum on the \OBJ at acroform object.
Then, after the \end{Form}, I can set the contents and here also
the one line I need for a Form which calculates things, the /CO entry.
As I know from looking at the pdf file, my result field will get the
object number 28, so I can set this "by hand". The resulting pdf file
does exactly what it should do: one can enter two numbers and it gives
the sum in the third field.
The one thing missing is to get the object number of the
last TextField within the TeX source. I looked at hpdftex.def
and the object is created via pdfstartlink. Checking
pdftex.web makes clear, that there is no global variable to keep
the number of the last object created with pdfstartlink.
Patching pdfTeX to add some \pdf_last_link would be nice.
Actually I tried to add this to pdftex.web, but I had to learn,
that patching pdfTeX isn't as easy as copy&paste in a C source :(
Maybe you have an idea for a workaround?
Thanks, Ralf
--
Ralf Utermann
_____________________________________________________________________
Universität Augsburg, Institut für Physik -- EDV-Betreuer
Universitätsstr.1
D-86135 Augsburg Phone: +49-821-598-3231
SMTP: Ralf.Utermann at Physik.Uni-Augsburg.DE Fax: -3411
More information about the pdftex
mailing list