- Posts: 25
- Thank you received: 0
Microsoft Windows Phone 8.1 support ends (13 Jul 2017)
Microsoft has ended support for Windows Phone 8.1
Questions about Android development and PDF
Save annotations and insert them on next load
IP: 192.168.0.71
11 years 5 months ago #7005
by Gracanin
Save annotations and insert them on next load was created by Gracanin
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)?
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)?
IP: 192.168.0.71
11 years 5 months ago #7006
by Gracanin
Replied by Gracanin on topic Save annotations and insert them on next load
Also, can I save text highlights and notes externally as well?
IP: 192.168.0.71
11 years 2 months ago #7948
by marais
Replied by marais on topic Save annotations and insert them on next load
Have you had any resolve on this? Im also trying to load saved rectangle.
IP: 192.168.0.71
11 years 2 months ago - 11 years 2 months ago #7949
by radaee
Replied by radaee on topic Save annotations and insert them on next load
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.
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: 11 years 2 months ago by .
IP: 192.168.0.71
11 years 2 months ago #7967
by marais
Replied by marais on topic Save annotations and insert them on next load
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
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
IP: 192.168.0.71
11 years 2 months ago #7969
by radaee
Replied by radaee on topic Save annotations and insert them on next load
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;
dibx = vpage.ToDIBX(pdfx);
diby = vpage.ToDIBY(pdfy);
viewx = vpage.GetVX(PDFView.vGetX()) + dibx;
viewy = vpage.GetVY(PDFView.vGetY()) + diby;
Time to create page: 0.477 seconds