Javascript to number PDF pages

T

Tiziano Eberini

Dear all,

we need to number the pages of a PDF document by using a javascript.

This is what we tried:

" this.numPage = 1;
var np = this.getField("n");
var i = 1;
for (i = 1;i <= this.numPages;i++)
{
np.value = util.printf(this.numPage);
this.numPage++;
np = this.getField("n");
} "

where "n" is the name of the numeric field we want to use to display the
page numbers. This script does not work properly and we would be
grateful if you could give us some help.

How does "getField" works? How many and which parameters does it
require?

Thank you in advance and best regards,

Tiziano
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,156
Latest member
KetoBurnSupplement
Top