RadaeePDF.com :: Topic: Save annotations and insert them on next load (1/1)
Welcome, Guest
Username: Password: Remember me

Signin/Signup with:

Questions about Android development and PDF

TOPIC: Save annotations and insert them on next load

Save annotations and insert them on next load 3 years 1 month ago #7005

  • Gracanin
  • Gracanin's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 25
  • Karma: 0
Hello,

I managed to save a rectangle annotation. I don't want to save the annotation to the PDF instead I want to save it to a database.

How can I load all annotations from database and insert them into the PDF after opening the PDF file?

1. Open PDF
2. Load annotations for PDF
3. Load thumbnails

for example,
I have a saved rectangle (x1, y1, x2, y2) on page 6. How do I tell the library to add the rectangle to page 6 if I'm currently at page 0 (front page)?
The administrator has disabled public write access.
The following user(s) said Thank You: sultan

Save annotations and insert them on next load 3 years 1 month ago #7006

  • Gracanin
  • Gracanin's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 25
  • Karma: 0
Also, can I save text highlights and notes externally as well?
The administrator has disabled public write access.

Save annotations and insert them on next load 2 years 9 months ago #7948

  • marais
  • marais's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
  • Karma: 0
Have you had any resolve on this? Im also trying to load saved rectangle.
The administrator has disabled public write access.

Save annotations and insert them on next load 2 years 9 months ago #7949

  • radaee
  • radaee's Avatar
  • OFFLINE
  • Moderator
  • Posts: 825
  • Thank you received: 10
  • Karma: 43
for rectangle annotation:
save: record pageno and rect in PDF coordinate to DB.
load: load rect then, convert to DIB coordinate.
for markup(highlight and others) annotation:
save: record pageno and 2 points(start and end) in PDF coordinate.
load: load 2 points then, convert to DIB coordinate.
Last Edit: 2 years 9 months ago by .
The administrator has disabled public write access.

Save annotations and insert them on next load 2 years 9 months ago #7967

  • marais
  • marais's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
  • Karma: 0
I already have the loaded coordinates from the db. Is there a method to generate this DIB coordinate object?

Also when I have this DIB coordinate is there a method available i can pass this into to draw this hihglight on the required page?

Regards
The administrator has disabled public write access.

Save annotations and insert them on next load 2 years 9 months ago #7969

  • radaee
  • radaee's Avatar
  • OFFLINE
  • Moderator
  • Posts: 825
  • Thank you received: 10
  • Karma: 43
PDFVPage vpage = PDFView.vGetPage(pageno);
dibx = vpage.ToDIBX(pdfx);
diby = vpage.ToDIBY(pdfy);
viewx = vpage.GetVX(PDFView.vGetX()) + dibx;
viewy = vpage.GetVY(PDFView.vGetY()) + diby;
The administrator has disabled public write access.
Powered by Kunena Forum