Saving annot to Database as Database/JSON ? - RadaeePDF.com
Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
13 Jul 2017
Microsoft has ended support for Windows Phone 8.1
Read More...
Submit your requests and polls about new features

TOPIC: Saving annot to Database as Database/JSON ?

Saving annot to Database as Database/JSON ? 3 years 1 month ago #8570

  • imran.nazeer
  • imran.nazeer's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 27
  • Thank you received: 0
Is it possible to save the annot as JSON and sync with different devices.
For example, consider I'm creating a rectangle annot.
I want to save the annot into my database/json(i can convert) and again i have to insert the annot from database.

Thanks in Advance

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

Saving annot to Database as Database/JSON ? 3 years 1 month ago #8619

  • emanuele
  • emanuele's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 489
  • Karma: 15
  • Thank you received: 53
Hi,

to make this feature, you should follow this steps:
- extract all the annotations with PDFPage annotAtIndex method and save the annot rect (or other informations needed, like the annot page).
- retrieve the informations from the database
- parse the informations paying attention to annot types
- add annotations on your pdf, using the specific method for the annot type

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

Saving annot to Database as Database/JSON ? 3 years 1 month ago #8620

  • imran.nazeer
  • imran.nazeer's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 27
  • Thank you received: 0
extract all the annotations with PDFPage annotAtIndex method and save the annot rect (or other informations needed, like the annot page).

I cant get any information from this. I kept debug pointer nothing happens. can you please elabarate more on this ?

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

Saving annot to Database as Database/JSON ? 3 years 1 month ago #8621

  • imran.nazeer
  • imran.nazeer's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 27
  • Thank you received: 0
extract all the annotations with PDFPage annotAtIndex method and save the annot rect (or other informations needed, like the annot page).

I cant get any information from this. I kept debug pointer nothing happens. can you please elabarate more on this ?

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

Saving annot to Database as Database/JSON ? 3 years 1 month ago #8622

  • emanuele
  • emanuele's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 489
  • Karma: 15
  • Thank you received: 53
for each page you should do something like:
PDFVPage *vpage = [m_view vGetPage:0];
    PDFPage *page = [vpage GetPage];
    
    for (int i = 0; i < page.annotCount; i++) {
        PDFAnnot *anAnnot = [page annotAtIndex:i];
        PDF_RECT rect;
        [anAnnot getRect:&rect];
    }
this is an example, so I get only page 0

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

Saving annot to Database as Database/JSON ? 3 years 1 month ago #8623

  • imran.nazeer
  • imran.nazeer's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 27
  • Thank you received: 0
How to save the annotation points initially. This code will give how to extract. But consider, I'm opening a page in device 1 and adding circle and close the app and opens in other device. How can i view the added annot from device 1 to device 2.

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

Powered by Kunena Forum