If you need to get/set values of AcroForm from your PDF file and you are using the RadaeePDF Cordova plugin this article is good for you.
With GetMarkupAnnotationDetails(int pageno) you can get a list of all the Markup annotations in a page as a JSON document.
pageno: page number
Android:
String markupAnnotations = mPdfManager.GetMarkupAnnotationDetails(int pageno);
iOS:
string json = plugin.GetMarkupAnnotationDetails(page);
JSON Example:
"[{
"left": 128.6949462890625,
"bottom": 277.17999267578125,
"right": 303.6849365234375,
"top": 299.47998046875,
"type": 9
}]"
With AddMarkupAnnotation(int pageno, int type, int index1, int index2) you can get add a markup annotation
pageno: page number
type: markup annotation type as defined by
0: Highlight
1: Underline
2: StrikeOut
3: Highlight without round corner
4: Squiggly underline.
index1: starting character index
index2: ending character index
Android:
mPdfManager.addMarkupAnnotation(int page, int type, int index1, int index2)
iOS:
plugin.AddMarkupAnnotation(int page, int type, int index1, int index2)
To retrieve character index from PDF points, use getCharIndex(int page, float x, float y)
Android:
int index = mPdfmanager.getCharIndex(int page, float x, float y)
iOS:
int index = plugin.GetCharIndex(page, x, y);
RadaeePDF SDK for Android, RadaeePDF SDK for iOS, RadaeePDF SDK for Cordova
Created : 2020-09-03 10:53:07, Last Modified : 2021-05-27 13:43:54