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?

More
IP: 192.168.0.70 13 years 2 months ago #1304 by callsamik
How to implement Bookmark using this SDK ?
More
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
More
IP: 192.168.0.70 13 years 2 months ago #1322 by callsamik
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?
More
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?
More
9 years 7 months ago #11105 by mrawy
Replied by mrawy on topic How to implement Bookmark?
Hello,
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; }
The problem is when i close the PDF after adding outlines and re-open it i can not get the outlines:
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(); } }
More
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:
  1. You have an activated premium license, to be able to change/add/remove the outline
  2. 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
Powered by Kunena Forum