These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Finding word and placing a field on it on a specific page

saj
Registered: Oct 15 2008
Posts: 52

I need some guidance.
I have an large index that I need to place a fields linked to that specific page in the document. Is there an easy way of doing this? I am currently making a button for each page number. But, thinks there should be a way it can read the page number and automatically place a button with the correct page destination on it.
 
Any help?
thanks,
sj

My Product Information:
Acrobat Pro 9.4.3, Macintosh
saj
Registered: Oct 15 2008
Posts: 52
I found this and altered it to work, however, I can't figure out what I need to change to make it for the page I'm on, not the whole document.
Help anyone?
for (var p = 0; p < this.numPages; p++)
{var numWords = this.getPageNumWords(p);
for (var i=0; i
saj
Registered: Oct 15 2008
Posts: 52
It's not posting the whole script. I'll try again

for (var p = 0; p < this.numPages; p++)
{var numWords = this.getPageNumWords(p);
for (var i=0; i
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Since the forum posts are converted to HTML, characters like the angle bracket are problematic. You have to use the HTML syntax.

If you want to acquire only the words on a specific page, then do not use the page loop. Instead, set the value of "p" explicitly before running the word loop.

You might be interested in reading these articles before you go further:
http://acrobatusers.com/tutorials/2006/page_bounds
http://acrobatusers.com/tutorials/2007/06/js_add_buttons_to_pdf/

You'll also find detailed articles on PDF coordinates, words, and placing fields at www.pdfscripting.com


Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script