- Posts: 25
- Thank you received: 0
Microsoft Windows Phone 8.1 support ends (13 Jul 2017)
Microsoft has ended support for Windows Phone 8.1
Questions about iOS development and PDF
Save Markup to database and delete from database
IP: 192.168.0.71
11 years 7 months ago #7301
by Gracanin
Save Markup to database and delete from database was created by Gracanin
I'm trying to save annotations externally in a database.
On Android i use Annotation.GetMarkupRects() and then Page.ObjsGetCharRect() for the first and last markup rect to get the startIndex and endIndex of markup. Then I use the indexes to delete the annotation from database
On iOS there is no method getMarkupRects() probably because it has a return value float[]
How can I get the start and end index of markup annotation in iOS from an existing annotation that I added to the PDF?
On Android i use Annotation.GetMarkupRects() and then Page.ObjsGetCharRect() for the first and last markup rect to get the startIndex and endIndex of markup. Then I use the indexes to delete the annotation from database
On iOS there is no method getMarkupRects() probably because it has a return value float[]
How can I get the start and end index of markup annotation in iOS from an existing annotation that I added to the PDF?
IP: 192.168.0.161
11 years 7 months ago #7419
by emanuele
Replied by emanuele on topic Save Markup to database and delete from database
Hi,
a new version is available here:
www.androidpdf.mobi/download/download-pr...56-ios-pdfviewer-304
we added getMarkupRects method
a new version is available here:
www.androidpdf.mobi/download/download-pr...56-ios-pdfviewer-304
we added getMarkupRects method
IP: 192.168.0.71
11 years 7 months ago #7434
by Rossi
Replied by Rossi on topic Save Markup to database and delete from database
Hi,
i try to use this new methods, this is may code
[annot getMarkupRects:&rect :0];
but all the rects value are always 0 or around 0.
i try to use this new methods, this is may code
[annot getMarkupRects:&rect :0];
but all the rects value are always 0 or around 0.
IP: 192.168.0.161
11 years 7 months ago #7436
by emanuele
Replied by emanuele on topic Save Markup to database and delete from database
Hi,
thank you for the feedback, we will fix it as soon as possible
thank you for the feedback, we will fix it as soon as possible
IP: 192.168.0.71
11 years 7 months ago #7441
by stronglee
Replied by stronglee on topic Save Markup to database and delete from database
Use this method as follows:
int count = [annot getMarkupRects :NULL :0];
PDF_RECT *rects = (PDF_RECT *)malloc(sizeof(PDF_RECT) * count);
[annot getMarkupRects :rects :count];
//...
free(rects);
int count = [annot getMarkupRects :NULL :0];
PDF_RECT *rects = (PDF_RECT *)malloc(sizeof(PDF_RECT) * count);
[annot getMarkupRects :rects :count];
//...
free(rects);
- TalonLancer
- Offline
- New Member
-
Less
More
- Posts: 2
- Thank you received: 0
IP: 192.168.0.71
11 years 7 months ago #7445
by TalonLancer
I tried using this by adding an underline annotation with 3 lines.
When the app reached "int count = [annot getMarkupRects :NULL :0];" it worked properly (setting count = 3).
However, when the app arrived at "[annot getMarkupRects :rects :count];" the app crashed. I changed "[annot getMarkupRects :rects :count];" into "[annot getMarkupRects :rects :0];" It ran smoothly, but, as Rossi had said, the rects returned 0.
Replied by TalonLancer on topic Save Markup to database and delete from database
stronglee wrote: Use this method as follows:
int count = [annot getMarkupRects :NULL :0];
PDF_RECT *rects = (PDF_RECT *)malloc(sizeof(PDF_RECT) * count);
[annot getMarkupRects :rects :count];
//...
free(rects);
I tried using this by adding an underline annotation with 3 lines.
When the app reached "int count = [annot getMarkupRects :NULL :0];" it worked properly (setting count = 3).
However, when the app arrived at "[annot getMarkupRects :rects :count];" the app crashed. I changed "[annot getMarkupRects :rects :count];" into "[annot getMarkupRects :rects :0];" It ran smoothly, but, as Rossi had said, the rects returned 0.
Time to create page: 0.594 seconds