Previous | Next | (P-PDF) JavaScript
Topic: Re: Obtaining template (Via Email)
Conf: (P-PDF) JavaScript, Msg: 27396
From: dpstory
Date: 9/20/2001 06:28 AM
On 20 Sep 01, at 6:21, p-pdf-javascript Listmanager wrote:
> From: "Steve"
>
> --- Planet PDF Forum | http://forum.planetpdf.com ----
>
> Double Dog Dare - this could be interesting...
>
> Scenario: I'm creating an FDF stream using the FDF Toolkit. I am
> also utilizing the AddTemplate method to spawn template pages within
> the PDF that I am constructing.
>
> Info: When templates are added with newPage = false and rename = true
> the template # is incremented for each template added to a page. The
> renaming scheme specifies to prepend ("P" + page# + ".template name_"
> + template#) before the field name. Template# indicates that the
> template added is the nth template added to the PAGE not the nth
> template within the document.
>
> Challenge: When I create the Template and place JavaScript behind
> actions/fields I do not know how many templates may be spawned on a
> particular page. Therefore, field references get really hard in
> JavaScript. Does anyone know how to obtain the template# for the
> template so when the field is accessed via JavaScript that that the
> right field name is used.
>
> Steve
>
Create a regular expression to search the template field name, you
can work it so that the template number is returned from your
search.
dps