By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,687 Members | 2,228 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,687 IT Pros & Developers. It's quick & easy.

How to get links from Acrobat pdf file ???

P: n/a
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

Dec 19 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Ptaku25 wrote:
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

Dec 20 '05 #2

P: n/a
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

Dec 20 '05 #3

P: n/a
Ptaku25 wrote:
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

Dec 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.