File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Performance and the fly likes JPEDAL: Put a Listener on internal references (page/chapiter links)  for a PDF document Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Performance
Bookmark "JPEDAL: Put a Listener on internal references (page/chapiter links)  for a PDF document" Watch "JPEDAL: Put a Listener on internal references (page/chapiter links)  for a PDF document" New topic
Author

JPEDAL: Put a Listener on internal references (page/chapiter links) for a PDF document

Jpedal Asker
Greenhorn

Joined: Jun 16, 2011
Posts: 2
Hi,

how can I attach a listener to existing links on a certain page, which refer to another page?

What I can already do, is getting the Subtype of the extracted annotation Object and check if i've got an URL:




How to perform the same as in PART 2, but for internal references?

To exchange PdfDictionary.URI by PdfDictionary.Outlines didn't work.
Nam Ha Minh
Ranch Hand

Joined: Oct 31, 2011
Posts: 498

Hi,

I got stuck at the same problem like you.

Did you manage to solve the problem?

Thanks.

PM Me If You Want to get Urgent Help on Java Programming
Nam Ha Minh
Ranch Hand

Joined: Oct 31, 2011
Posts: 498

Luckily, I have found a solution for the problem. See my detailed explanation here: http://blog.codejava.net/nam/parsing-link-annotation-in-pdf-document/
Hope this will help others who are facing the same problem.
Jpedal Asker
Greenhorn

Joined: Jun 16, 2011
Posts: 2
I solved the problem by overwriting the DefaultActionHandler by the same mehtod, but specifying the ActionFactory. In this way you can tell exactly what should happen when an annotation has been clicked:

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JPEDAL: Put a Listener on internal references (page/chapiter links) for a PDF document