Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about iOS development and PDF
  • Page:
  • 1
  • 2

TOPIC:

Save Markup to database and delete from database 9 years 7 months ago #7301

  • Gracanin
  • Gracanin's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 25
  • Thank you received: 0
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?

Please Log in or Create an account to join the conversation.

Save Markup to database and delete from database 9 years 6 months ago #7419

  • emanuele
  • emanuele's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 580
  • Thank you received: 67
Hi,

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

we added getMarkupRects method

Please Log in or Create an account to join the conversation.

Save Markup to database and delete from database 9 years 6 months ago #7434

  • Rossi
  • Rossi's Avatar
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 49
  • Thank you received: 0
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.

Please Log in or Create an account to join the conversation.

Save Markup to database and delete from database 9 years 6 months ago #7436

  • emanuele
  • emanuele's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 580
  • Thank you received: 67
Hi,

thank you for the feedback, we will fix it as soon as possible

Please Log in or Create an account to join the conversation.

Save Markup to database and delete from database 9 years 6 months ago #7441

  • stronglee
  • stronglee's Avatar
  • Offline
  • Premium Member
  • Premium Member
  • Posts: 93
  • Thank you received: 2
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);

Please Log in or Create an account to join the conversation.

Save Markup to database and delete from database 9 years 6 months ago #7445

  • TalonLancer
  • TalonLancer's Avatar
  • Offline
  • New Member
  • New Member
  • Posts: 2
  • Thank you received: 0

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.

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
  • 2
Powered by Kunena Forum