How to get links from Acrobat pdf file ???

P

Ptaku25

I have in a few first page defined links (font blue color) row by row
which are links for to appropriate pages in this pdf document.

Could you tell how to get this links in javascript lang ???
Which method or function I should to invoke to get links which arer
defined in my pdf document ???


Regards,
Piotrek
 
D

David Wahler

Ptaku25 said:
I have in a few first page defined links (font blue color) row by row
which are links for to appropriate pages in this pdf document.

Could you tell how to get this links in javascript lang ???
Which method or function I should to invoke to get links which arer
defined in my pdf document ???

Your question is unclear. Are you talking about links from a web page
to a PDF file, or links that are within the PDF? In the former case,
you can simply loop over the links in your document and select the
appropriate ones. (Hint: document.getElementsByTagName may come in
handy.)

If you are talking about links within a PDF, the situation is vastly
more difficult. As far as I know, Acrobat Reader and similar plugins do
not expose any kind of DOM for PDF documents to JavaScript code running
in the browser. If you really badly need to extract this information
and can't do it on the server, it's probably possible to have a
client-side script parse the PDF file and read the links, but it would
be a very involved project.

-- David
 
P

Ptaku25

I talking about links within a PDF document (inside PDF document),
How to catch this links in the PDF inside document and put it as a
bookmark for navigation panel ?


Regards,
Piotrek
 
D

David Wahler

Ptaku25 said:
I talking about links within a PDF document (inside PDF document),
How to catch this links in the PDF inside document and put it as a
bookmark for navigation panel ?

The only way I can think of to do what you are asking is to include the
bookmarks as part of the PDF file itself, using Acrobat's "table of
contents" feature. There is no practical way that I can find to get
this information from a web browser environment; even if you could,
there doesn't appear to be a way to cause Acrobat Reader to navigate to
a particular page from JavaScript.

In other words, unless somebody here can find a way of doing this that
I missed, you're out of luck. Sorry.

-- David
 

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,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top