Knowledge Base - How to add/remove bookmarks?

This article shows you how to add or remove bookmarks using BMDatabase Radaee class.

You need a Standard license to do this.

 

public void insertDeleteBookmark(String dbPath, String pdfPath, int mPageno) {

BMDatabase mBmDatabase = new BMDatabase();
if (mBmDatabase.OpenOrCreate(dbPath)) {
boolean mNeedInsert = true;
long mRecordHandle = mBmDatabase.RecOpen(pdfPath);
int mRecords = mBmDatabase.RecGetCount(mRecordHandle);
for (int i = 0; i < mRecords; i++) {
if (mBmDatabase.RecItemGetPage(mRecordHandle, i) == mPageno) {
mBmDatabase.RecItemRemove(mRecordHandle, i);
mNeedInsert = false;
break;
}
}
if (mNeedInsert)
mBmDatabase.RecItemInsert(mRecordHandle, "Page " + (mPageno + 1), mPageno);

mBmDatabase.RecClose(mRecordHandle);
mBmDatabase.Close();
}
}
Applies To

RadaeePDF SDK for Android

Details

Created : 2017-01-19 10:23:28, Last Modified : 2017-01-19 10:25:53