How to implement Bookmark? - RadaeePDF.com
Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
13 Jul 2017
Microsoft has ended support for Windows Phone 8.1
Read More...
Questions about Android development and PDF
  • Page:
  • 1

TOPIC: How to implement Bookmark?

How to implement Bookmark? 5 years 9 months ago #1304

  • callsamik
  • callsamik's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 2
  • Thank you received: 0
How to implement Bookmark using this SDK ?
The topic has been locked.

How to implement Bookmark? 5 years 9 months ago #1306

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 846
  • Karma: 43
  • Thank you received: 12
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
The topic has been locked.

How to implement Bookmark? 5 years 9 months ago #1322

  • callsamik
  • callsamik's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 2
  • Thank you received: 0
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?
The topic has been locked.

How to implement Bookmark? 5 years 9 months ago #1326

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 846
  • Karma: 43
  • Thank you received: 12
OK, it think you'd better record bookmark using SQLLite or XML?
The topic has been locked.

How to implement Bookmark? 2 years 2 months ago #11105

  • mrawy
  • mrawy's Avatar
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 20
  • Thank you received: 0
Hello,
I implemented add outline like this:
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:
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();

        }

    }
The topic has been locked.

How to implement Bookmark? 2 years 2 months ago #11115

  • nermeen
  • nermeen's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 865
  • Karma: 23
  • Thank you received: 70
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.
The topic has been locked.
  • Page:
  • 1
Powered by Kunena Forum