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

Automating hyperlinks in Javascript

taupirho
Registered: Oct 7 2008
Posts: 16

I am a newbie to Adobe and Javascript. Running Adobe 8 Professional.

I have a , say, 51 page PDF document - a header page and 50 pages of data . On the header page lets say I have 50 items of text that say Goto Page 1, Goto Page 2 etc ... I'd like to automate the selection of each item of text on the header page and change it to a hyperlink so that clicking on each link would take the user to the relevant data page. On each data page I would have an item of text e.g Return to Header Page which again I'd like to convert to a hyperlink and allow the user tio jump back to the header page. Is this possible in Javascript? If so, any code snippets, ideas or help would be appreciated.

saraveenan
Registered: Oct 21 2007
Posts: 38
Hi

Please be specific, do you need hyperlink or link to another page in the pdf?

According to what you mentioned here it seems like you need to link to the pages in the same file. if so, this can be done simply by creating links manually or by using third party plug-ins.

Regards,

Saravana

Saravanan Murugesan

taupirho
Registered: Oct 7 2008
Posts: 16
This is going to be one PDF document. Each link on the header page will link to a data page in the same document. I need to automate this job as the document get re-created each day.
maxwyss
Registered: Jul 25 2006
Posts: 255
How is that document created? Which tool is used?
taupirho
Registered: Oct 7 2008
Posts: 16
The document will be created using excel. There will be approx 4 different spreadsheets with between 10 and 15 sheets in each. A final job amalgamates these 4 spreadsheets into one final one and its then PDF'd from within EXCEL. I know what your going to say next but trust me - I've tried it - using both pdfmaker and print to pdf and it doesn't work. I get strange codes superimposed on the links and they just don't work. I believe its a memory problem as I do a very similar process with a much smaller (approx 17 page) spreadsheet with no problems at all. Hence the reason I'm looking for alternatives such as using javascript to post-process the PDF file and create the links on the fly as it were.
saraveenan
Registered: Oct 21 2007
Posts: 38
Hi Taupi,

I can tryout this if i could get a sample of the file you create (a dummy sample). Send me @ saraveenan [at] gmail [dot] com. I will try to find the solution.Regards,

Saravana :)

Saravanan Murugesan