RadaeePDF.com :: Topic: Saving annot to Database as Database/JSON ? (1/3)
Welcome, Guest
Username: Password: Remember me

Signin/Signup with:

Submit your requests and polls about new features

TOPIC: Saving annot to Database as Database/JSON ?

Saving annot to Database as Database/JSON ? 2 years 4 months ago #8570

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
The administrator has disabled public write access.

Saving annot to Database as Database/JSON ? 2 years 4 months ago #8619

  • emanuele
  • emanuele's Avatar
  • OFFLINE
  • Moderator
  • Posts: 402
  • Thank you received: 44
  • Karma: 13
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
The administrator has disabled public write access.

Saving annot to Database as Database/JSON ? 2 years 4 months ago #8620

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 ?
The administrator has disabled public write access.

Saving annot to Database as Database/JSON ? 2 years 4 months ago #8621

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 ?
The administrator has disabled public write access.

Saving annot to Database as Database/JSON ? 2 years 4 months ago #8622

  • emanuele
  • emanuele's Avatar
  • OFFLINE
  • Moderator
  • Posts: 402
  • Thank you received: 44
  • Karma: 13
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
The administrator has disabled public write access.

Saving annot to Database as Database/JSON ? 2 years 4 months ago #8623

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.
The administrator has disabled public write access.
Powered by Kunena Forum