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

TOPIC:

Capturing Annotation Click... 9 years 2 months ago #8418

  • tschumaker
  • tschumaker's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 1
  • Thank you received: 0
I am trying to understand how to get a handle on "annotations' while evaluating the Android PDF software.

My environment:

* I am using version 3.3.1.
* When I asked this question earlier, I was referred to the following knowledgebase article:
www.radaeepdf.com/support/knowledge-base?view=kb&kbartid=6

However, I do not see PDFReaderListener classes as even being available, only PDFThumbListener and PDFViewListener (both of these listeners do not provide "annotation semantics").

I am attaching my working program below, along with the annotation PDF file (that has the clicks embedded in them, which I want to capture).
(ignore the 1st Java file, look at the second one.

Thanks ahead of time for any suggestions.

Troy
Attachments:

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

Last edit: by tschumaker.

Capturing Annotation Click... 9 years 2 months ago #8420

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 1123
  • Thank you received: 73
fist of all, u shall need a professional license.
and then derive class like:
public class PDFReaderAct extends Activity PDFReaderListener
eclipse shall auto generate all methods for PDFReaderListener.

when Activity start, invoke Global.Init(); and open PDF file.
then, open PDFReader codes like:
m_reader.PDFOpen(m_doc, false, this);
there are method:
public void OnAnnotClicked(PDFVPage vpage, Annotation annot)
for PDFReaderListener, which implement in Activity class
public void OnAnnotClicked(PDFVPage vpage, Annotation annot)
{
m_reader.PDFPerformAnnot();
}
when user click on an annotation.
if itis link jump to another page, shall auto jumping.
others, shall call other callbcks:
public void OnOpenJS(String js)
	{
		//todo: parser java-script.
	}
public void OnOpenURI(String uri)
	{
	}
public void OnOpenMovie(String path)
	{
	}
public void OnOpenSound(int[] paras, String path)
	{
	}
public void OnOpenAttachment(String path)
	{
	}
public void OnOpen3D(String path)
	{
	}

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

Last edit: by Davide.

Capturing Annotation Click... 9 years 2 months ago #8422

  • support
  • support's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 692
  • Thank you received: 59
It seems you are using the httpstream demo skeleton.
That application is really simple and I suggest you to start your testing from the full demo project.
May be, if the stream input is a must for you, you should change the Document.Open with a Document.OpenStream.

Or are there some other reasons you was starting with the simpler package?

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

  • Page:
  • 1
Powered by Kunena Forum