Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about Android development and PDF
  • Page:
  • 1
  • 2

TOPIC:

How to get page number from link annotations. 9 years 8 months ago #6762

  • ayyubid
  • ayyubid's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 5
  • Thank you received: 0
Hi,
I am trying to page jump via link annotations.
The link annotations were assigned the following script.
"this.pageNum=10"
I implement PDFReaderListener and call PDFPerformAnnot() in the OnAnnotClicked method.
I expected to get page number or script string from uri parameter in OnOpenURI, but it was null.
Is there any way to get the page number from link annotation?
Thanks.

Please Log in or Create an account to join the conversation.

Last edit: by wahyu_pratama.

How to get page number from link annotations. 9 years 8 months ago #6763

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Thank you received: 65
Hi,

the OnOpenURI method return null beacuse it handles external links like URL, not page jump links.

To handle page jump links you can use
m_view.vGotoPage(dest);
like in the demo project

You can also check in the demo project the PDFPerformAnnot method in PDFReader class.

Please Log in or Create an account to join the conversation.

How to get page number from link annotations. 9 years 8 months ago #6764

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 1123
  • Thank you received: 73
javascript not supported yet.
just support Goto Action

Please Log in or Create an account to join the conversation.

How to get page number from link annotations. 9 years 8 months ago #6765

  • ayyubid
  • ayyubid's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 5
  • Thank you received: 0
Thanks for the reply.

It's a pity not support javascript.
I would like to see this in future release.

I'll change the link script to the external link in order to get page number from annotation.
It's not working as a page jump in general pdf readers, but my pdf file is only used in my application.

Thnak you.

Please Log in or Create an account to join the conversation.

How to get page number from link annotations. 9 years 8 months ago #6772

  • nermeen
  • nermeen's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 962
  • Thank you received: 87
Please check the new Version 2.9.11beta17

it has a new interface Annotation.GetJS() to get java script.

Please Log in or Create an account to join the conversation.

How to get page number from link annotations. 9 years 8 months ago #6775

  • ayyubid
  • ayyubid's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 5
  • Thank you received: 0
I really appreciate your prompt measures.
I check new release. The new interface OnOpenJS and GetJS works nice.

I have a one more request.
May I ask you to release this feature to the iOS SDK?
We are developing also for iOS application...

Thank you.

Please Log in or Create an account to join the conversation.

Last edit: by wahyu_pratama.
  • Page:
  • 1
  • 2
Powered by Kunena Forum