Save Markup to database and delete from database - RadaeePDF.com
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

Save Markup to database and delete from database 4 years 6 months ago #7301

  • Gracanin
  • Gracanin's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • 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 4 years 5 months ago #7419

  • emanuele
  • emanuele's Avatar
  • Online
  • Moderator
  • Moderator
  • Posts: 543
  • Karma: 21
  • Thank you received: 65
Hi,

a new version is available here:
http://www.androidpdf.mobi/download/download-preview-beta/file/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 4 years 5 months ago #7434

  • Rossi
  • Rossi's Avatar
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 49
  • Karma: 1
  • 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 4 years 5 months ago #7436

  • emanuele
  • emanuele's Avatar
  • Online
  • Moderator
  • Moderator
  • Posts: 543
  • Karma: 21
  • Thank you received: 65
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 4 years 5 months ago #7441

  • stronglee
  • stronglee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 92
  • Karma: 1
  • 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 4 years 5 months ago #7445

  • TalonLancer
  • TalonLancer's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 2
  • Thank you received: 0

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.

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

  • Page:
  • 1
  • 2
Powered by Kunena Forum