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

TOPIC:

Trying to make link&index in pdf clickable 9 years 10 months ago #6503

  • Sokołowski
  • Sokołowski's Avatar Topic Author
  • Visitor
  • Visitor
We have based our application on PDFHttpDemo and found that links are unclickable. To fix it we are trying to adopted some code from PDFReader example.
	public boolean OnPDFSingleTapped(float x, float y)
	{
		if( m_status == STA_NORMAL || m_status == STA_ANNOT )
		{
			m_annot_pos = m_view.vGetPos((int)x, (int)y);
			m_annot_page = m_view.vGetPage(m_annot_pos.pageno);
			Page page = m_annot_page.GetPage();
			if( page == null ) m_annot = null;
		else m_annot = page.GetAnnotFromPoint(m_annot_pos.x, m_annot_pos.y);

...

The question is why:
m_annot = page.GetAnnotFromPoint(m_annot_pos.x, m_annot_pos.y)

returns Annotation object in PDFReader example and NULL in PDFHttpDemo?

Regards,
L

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

Trying to make link&index in pdf clickable 9 years 10 months ago #6514

  • Sokołowski
  • Sokołowski's Avatar Topic Author
  • Visitor
  • Visitor
Still trying.

In the doc I have read "this [GetAnnotFromPoint] can be invoked after ObjsStart or Render or RenderToBmp" so I have tried to invoke Page.ObjsStart() with no success.

I guess this are all methods connected with pdf edition while we are tryig to create simple pdf reader. I think there should be a simple method to follow inner and externals links in pdf files but I can't find it.
Could you please show me direction?

While looking for solution we are using PDFHttpDmo with Premium license as doc says that annotation suppport needs proffessional+ licenses.
Will we have to upgrade our "standard" license to enable following links in pdf?

I will appreciate any help,
Regards,
L

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

Trying to make link&index in pdf clickable 9 years 9 months ago #6522

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 1123
  • Thank you received: 73
PDFHttpDemo does not actived license, it is view only.
so, link is not clickable.
and, annotation object not avaible in standard license.

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

Trying to make link&index in pdf clickable 9 years 9 months ago #6525

  • Sokołowski
  • Sokołowski's Avatar Topic Author
  • Visitor
  • Visitor
Thank you.
I will check but I'm not sure it is the reason as I can see
boolean succeeded = activePremium(...

in "global.java" and annotations fuction properly in the second example "PdfReader".

I will use "global.java" from "PDFReader" example and will name package accordingly to verify if it is the reason.

Regards,
L

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

Last edit: by hsu123.

Trying to make link&index in pdf clickable 9 years 9 months ago #6527

  • Sokołowski
  • Sokołowski's Avatar Topic Author
  • Visitor
  • Visitor
You were right.
Thank you.
boolean succeeded = activePremium(act, "radaee", "radaee_com@yahoo.cn", "LNJFDN-C89QFX-9ZOU9E-OQ31K2-FADG6Z-XEBCAO");

in PDFHttpDemo is a little bit confusing wouldn't be bettter to use "activeStandard" or activate the license as in PDFReader exmaple?

Best regards,
L

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

Last edit: by hsu123.
  • Page:
  • 1
Powered by Kunena Forum