I would like to create custom rectangular annotations, based on coordinates received (x, y, height, width) , programmatically on the PDF files when the viewer started.
Would also want the annotations to be clickable to do some actions (open a new view controller / alertDialog etc.)
I would like to annotate the text like in attachment picture, and the user will be only able to click on them but can't do any editing.
Would like ask the support team whether this possible with radaeepdf kit?
RadaeePDFManager radaeePDFManager = new RadaeePDFManager();
File file = new File(context.getFilesDir(), Utils.modFileName(epaperItem.getName()));
radaeePDFManager.openFromPath(context, file.getAbsolutePath(), "");
Similar to Faris, I also want to draw custom rectangular annotations based on coordinates received (x, y, height, width).
I have looked into your answer, but I confused on how to implement it.
On each page have different rectangular annotations, and I have like around 40+ pages to annotate.
How do I call this function?
Would love to receive some helps.
you can add a new method in PDFLayoutView class with the code of my previous post.
In my example I used static x, y, width, height and the current page to add the annotation, but you can edit the code and use variables to add the annotation on your page taking x, y, width, height and page as input parameters, than add a for cycle to call the function for each needed page.
For now I'm using AboutActivity in demo Android that RadaeePDF provided, since it the only one I see have PDFLayoutView in use.
I tried based on your suggestion, which to add new function A to draw rect.
I tried and error on which method shall I call this function A, since I don't really know where shall I call this.
void OnPDFPageModified(int pageno);
void OnPDFPageChanged(int pageno);
void OnPDFPageDisplayed(Canvas canvas, IVPage vpage);
void OnPDFPageRendered(IVPage vpage);
But none of them show the rectangle.
Further checking the method, I found out the method page.AddAnnotRect(..) return false. What does it means?
1. Where shall I call your code mention?
2. Why does page.AddAnnotRect(...) return false?
First of all, I suggest to use PDFViewController class (contained in PDFViewAct), as it implements all methods and callbacks.
Now you can choose the event where you will call your new method, for example you can check it with OnBlankTapped method, triggered where you tap on the pdf.
AboutActivity is used only to show the "about" info, for that reason it doesn't contain the toolbar.