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

More
IP: 192.168.0.71 11 years 7 months ago #7301 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?
More
IP: 192.168.0.161 11 years 7 months ago #7419 by emanuele
Hi,

a new version is available here:
www.androidpdf.mobi/download/download-pr...56-ios-pdfviewer-304

we added getMarkupRects method
More
IP: 192.168.0.71 11 years 7 months ago #7434 by Rossi
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.
More
IP: 192.168.0.161 11 years 7 months ago #7436 by emanuele
Hi,

thank you for the feedback, we will fix it as soon as possible
More
IP: 192.168.0.71 11 years 7 months ago #7441 by stronglee
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);
More
IP: 192.168.0.71 11 years 7 months ago #7445 by TalonLancer

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
Powered by Kunena Forum