Microsoft Windows Phone 8.1 support ends (13 Jul 2017)

Microsoft has ended support for Windows Phone 8.1

Questions about Android development and PDF

set an icon to indicate the added hyperlink

More
IP: 192.168.0.71 9 years 1 month ago #12686 by glzlaohuai
I want to add an hyperlink to a pdf file. And I use code below:
Code:
page.AddAnnotURI(rect, "http://www.radaeepdf.com/forum/newtopic");
The generated pdf file has nothing change visually, so I want to set an icon to indicate the added hyperlink, here is my code:
Code:
page.AddAnnotURI(rect, "http://www.radaeepdf.com/forum/newtopic"); //set an icon to indicate the added hyperlink page.GetAnnot(page.GetAnnotCount() - 1).SetIcon(R.drawable.pdf_custom_stamp);
Run above code cause an NullPointerException, GetAnnot(index) return null,.
My question is how to set an icon to indicate the added hyperlink, thanks.
More
IP: 192.168.0.71 9 years 1 month ago #12687 by nermeen
SetIcon is used to set icon for sticky text note/file attachment/Rubber Stamp annotations; so it wont work with hyperlink annotations.

To get the annotation you've just created:
Code:
if(page.AddAnnotURI(rect, "http://www.radaeepdf.com/forum/newtopic")) page.GetAnnot(page.GetAnnotCount() - 1);
Time to create page: 0.384 seconds
Powered by Kunena Forum