- Posts: 2
- 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
How to implement Bookmark?
IP: 192.168.0.70
13 years 2 months ago #1304
by callsamik
How to implement Bookmark? was created by callsamik
How to implement Bookmark using this SDK ?
IP: 192.168.0.70
13 years 2 months ago #1306
by radaee
Replied by radaee on topic How to implement Bookmark?
bookmark in PDF file or out of PDF file?
using Document.getOutline to get outlines.
if you need bookmarks out of PDF, you can using class BMDatabase
using Document.getOutline to get outlines.
if you need bookmarks out of PDF, you can using class BMDatabase
IP: 192.168.0.70
13 years 2 months ago #1322
by callsamik
Replied by callsamik on topic How to implement Bookmark?
I'm trying to add bookmark to an opened PDF and after that also want to show a list of all bokkmarks.. Can you suggest how to proceed?
IP: 192.168.0.70
13 years 2 months ago #1326
by radaee
Replied by radaee on topic How to implement Bookmark?
OK, it think you'd better record bookmark using SQLLite or XML?
9 years 7 months ago #11105
by mrawy
Replied by mrawy on topic How to implement Bookmark?
Hello,
I implemented add outline like this:
The problem is when i close the PDF after adding outlines and re-open it i can not get the outlines:
I implemented add outline like this:
Code:
public boolean addToBookmarks() {
boolean success;
float top = mDocument.GetPageHeight(0);
Document.Outline outline = mDocument.GetOutlines();
if (outline == null) {
success = mDocument.NewRootOutline(String.valueOf(mCurrentPage), mCurrentPage, top);
if (success) {
pdfSave();
outline = mDocument.GetOutlines();
}
}
success = outline != null && outline.AddChild(String.valueOf(mCurrentPage), mCurrentPage, top);
if (success) {
success = pdfSave();
}
return success;
}
Code:
private void fetchOutlines() {
if (mDocument == null) return;
Document.Outline outline = mDocument.GetOutlines();//first root is always null
fetchOutlines(outline);
}
private void fetchOutlines(Document.Outline outline) {
while (outline != null) {
Toast.makeText(mActivity, "" + outline.GetDest(), Toast.LENGTH_SHORT).show();
mOutlines.add(outline);
Document.Outline child = outline.GetChild();
if (child != null) {
fetchOutlines(child);
}
outline = outline.GetNext();
}
}
9 years 7 months ago #11115
by nermeen
Replied by nermeen on topic How to implement Bookmark?
Hello,
You need to make sure of the following:
Did you try this in the demo project or yours? and which version?
Note: i suggest you to create a new post as this one is very old.
You need to make sure of the following:
- You have an activated premium license, to be able to change/add/remove the outline
- To re-open them make sure that the document is opened
Did you try this in the demo project or yours? and which version?
Note: i suggest you to create a new post as this one is very old.
Time to create page: 0.415 seconds