RMSDK API Function List

Group

Function

Description

Status

 

int openFile (

  String url

);

Open an ePUB/PDF file and tell Adobe RMSDK Engine to prepare resource.

 

Parameters:

url

Document source, cannot be null

 

Return:

STATE_MESSAGE_OK

0

OK

STATE_FATAL_UNKNOWN

-1

There was an error while opening this document.

Unknown fatal error.

STATE_ERROR_UNKNOWN

-2

There was an error while opening this document.

Unknown error.

STATE_WARN_UNKNOWN

-3

There was an error while opening this document.

Unknown warning.

STATE_FATAL_SYS_INIT_FAIL

-102

There was an error while opening this document.

System initialize fail.

STATE_FATAL_PREVIOUS_FILE_NOT_CLOSED

-103

There was an error while opening this document.

Previous file is not closed.

STATE_FATAL_FILE_NOT_EXIST

-110

There was an error while opening this document.

This file cannot be found.

STATE_ERROR_PKG_RESOURCE_TOO_LONG

-140

There was an error while opening this document.

The PDF page size is too large.

STATE_ERROR_PKG_COMPRESSED_SIZE_TOO_BIG

-150

There was an error while opening this document.

The EPUB page size is too large.

STATE_ERROR_PKG_ARTIFICIAL_PAGE_BREAKS

-160

There was an error while opening this document.

The EPUB page size is too large.

STATE_WARN_PKG_BAD_REF

-170

There was an error while opening this document.

The reference of package is wrong.

STATE_ERROR_PASSHASH_NOT_FOUND

-400

There was an error while opening this document.

The EPUB file is pass-hash protected, need correct pass hash code to open it

STATE_ERROR_PDF_T3_NEED_PASSWORD

-410

There was an error while opening this document.

The PDF file is password protected, need correct password to open it

STATE_ERROR_USER_NOT_ACTIVATED

-440

There was an error while opening this document.

Device need to be activated before using.

STATE_ERROR_NO_VALID_LICENSE

-450

There was an error while opening this document.

Activation license is not valid

STATE_ERROR_CORE_EXPIRED

-451

There was an error while opening this document.

Load book has been expired, and should not be open for display

STATE_ERROR_CORE_LOAN_NOT_ON_RECORD

-452

There was an error while opening this document.

The loan book had been return by ADE, and no longer be available on device.

 

Example:

    String bookUrl = "/sdcard/mybook.pdf";

    int status = openFile(bookUrl);

 

    if (status == 0) {

        Log.d(TAG, "Open(" + bookUrl + ") success!");

    } else {

        Log.d(TAG, "Open(" + bookUrl + ") fail, status=" + status);

    }

 

Ready

int closeFile();

Close an ePUB/PDF file and tell Adobe Engine to release resource

 

Return:

STATE_MESSAGE_OK

0

OK

STATE_FATAL_UNKNOWN

-1

There was an error while closing this document.

Unknown fatal error.

STATE_ERROR_UNKNOWN

-2

There was an error while closing this document.

Unknown error.

STATE_WARN_UNKNOWN

-3

There was an error while closing this document.

Unknown warning.

 

Example:

    int status = closeFile();

 

    if (status == 0) {

        Log.d(TAG, "Close file success!");

    } else {

        Log.d(TAG, "Close file fail, status=" + status);

    }

 

Ready

void cancelProcessing (

);

Cancel long time processing.

 

Example:

    canelProcessing();

 

Ready

System

void setViewportSize (

  int w,

  int h

);

Assigns the size of the viewport in the document's coordinate system.

 

Parameters:

w

viewport width

h

viewport height

 

Example:

    int width = 600;

    int height = 800;

 

    setViewportSize(width, height);

 

 

Ready

void setFontSize (

  int size

);

Set font size.

 

Parameters:

size

0 à 15 points (ePUB)    0.8x (PDF)

1 à 18 points (ePUB)    1.0x (PDF)

2 à 20 points (ePUB)    2.0x (PDF)

3 à 22 points (ePUB)    3.0x (PDF)

 

Example:

    int size = 1;

     

    setFontSize(size);

 

Ready

int setPDFPassword(

   String pwd

);

Set password for PDF file

 

Parameters:

pwd

Password string for PDF file to be opened

 

Return:

STATE_MESSAGE_OK

0

OK

STATE_FATAL_UNKNOWN

-1

There was an error while setting password.

Unknown fatal error.

STATE_ERROR_UNKNOWN

-2

There was an error while setting password.

Unknown error.

STATE_WARN_UNKNOWN

 

 

 

-3

There was an error while setting password.

Unknown warning.

STATE_ERROR_PDF_EMPTY_PASSWORD

-420

There was an error while setting password.

The empty password is not allowed.

 

Example:

    String bookUrl = "/sdcard/mybook.pdf";

    String bookPassword = "1234";

    int status = openFile(bookUrl);

   

    // -410 means need to set password before open PDF file.

    if (status == -410) {

        // Set PDF password.

        status = setPDFPassword(bookPassword);

       

        if (status == 0) {

            // Open the file again.

            status = openFile(bookUrl);

        }

    }

 

Ready

int setPassHash (

  String username,

  String pwd

);

Set Passhash.

 

Parameters:

username

User name for this Pass-Hash protected ePUB file.

pwd

Password for this Pass-Hash protected ePUB file.

 

Returns:

STATE_MESSAGE_OK

0

OK

STATE_FATAL_UNKNOWN

-1

There was an error while setting pass hash.

Unknown fatal error.

STATE_ERROR_UNKNOWN

-2

There was an error while setting pass hash.

Unknown error.

STATE_WARN_UNKNOWN

-3

There was an error while setting pass hash.

Unknown warning.

STATE_ERROR_NULL_PASSHASH

-113

There was an error while setting pass hash.

Invalid Pass Hash.

STATE_ERROR_PASSHASH_NO_URL

-405

There was an error while setting pass hash.

Unable to get operator URL.

STATE_ERROR_PASSHASH_OP_FAIL

-406

There was an error while setting pass hash.

Pass Hash error.

 

 

Ready

int setUserActivation (

   String userID,

   String password

);

Activate device

 

Parameters:

userID

Adobe user ID

password

Adobe user ID password

 

Returns:

STATE_MESSAGE_OK

0

OK

STATE_FATAL_UNKNOWN

-1

There was an error while activate device.

Unknown fatal error.

STATE_ERROR_UNKNOWN

-2

There was an error while activate device.

Unknown error.

STATE_WARN_UNKNOWN

-3

There was an error while activate device.

Unknown warning.

STATE_WARN_DEVICE_ALREADY_ACTIVATED

-121

There was an error while activate device.

The device already activated.

STATE_FATAL_SYS_NOT_INIT

-101

There was an error while activate device.

System not initialized.

 

 

int setDeviceDeactivation();

De-activate device

 

Returns:

STATE_MESSAGE_OK

0

OK

STATE_FATAL_UNKNOWN

-1

There was an error while deactivate device.

Unknown fatal error.

STATE_ERROR_UNKNOWN

-2

There was an error while deactivate device.

Unknown error.

STATE_WARN_UNKNOWN

-3

There was an error while deactivate device.

Unknown warning.

STATE_WARN_DEVICE_NOT_ACTIVATE

-120

There was an error while deactivate device.

The device not activated before.

  

 

int setHash (

  String hash

);

Set hash.

Ready

int setScreenlandscape (

  boolean scape

);

Set if the screen is in Landscape mode.

 

Example:

    int width = 600;

    int height = 800;

 

    if (width > height) {

        setScreenlandscape(true);

    } else {

        setScreenlandscape(false);

    }

 

 

Testing

void setBackground (

  boolean background

);

 

Set background mode:

false -> day

true -> night

 

Example:

    setBackground(true);

 

Todo

Highlight

void getCurrentHighlightedPage (

  int[] pagebuf

);

Get “PageBuffer” for current highlighted page.

 

Example:

    int width = 600;

    int height = 800;

    int[] page_buffer = new int[width * height];

 

    getCurrentHighlightedPage(page_buffer);

 

Ready

boolean setHighlightbyloc (

  String start,

  String end,

  int z

);

Highlight the content between two locations.

 

Parameters:

start 

beginning of the range to highlight

end 

the end of the range to highlight

z

type type of the highlight, one of:

0: selection

1: annotation

 

Returns:

A Boolean indicate whether the operation is succeed or not.

 

Ready

boolean delHighlight (

  String start,

  String end,

  int z

);

Remove the highlighting specified by two locations and type.

 

Parameters:

start 

beginning of the range to highlight

end 

the end of the range to highlight

z

type type of the highlight, one of:

0: selection

1: annotation

 

Returns:

A Boolean indicate whether the operation is succeed or not.

 

Ready

void delAllHighlight();

Remove all highlighting both selection and annotation.

 

Parameters: none

 

Ready

Link

int getLinkCount();

Returns the number of links on the current screen.

Note: This API is needed for compatibility reasons and should be avoided.

The better way to handle links is by sending events to the renderer.

 

Example:

    int linkCount = getLinkCount();

 

Ready

void highlightLink(

  int linkIndex

);

Highlight the link by Index.

 

Parameters:

linkIndex

The index of link to be highlighted

 

Example:

    int linkIndex = 10;

    int linkCount = getLinkCount();

   

    if (linkIndex < linkCount) {

        highlightLink(linkIndex);

    }

 

Ready

void selectLink(

  int linkIndex

);

Select the link by Index.

 

Parameters:

linkIndex

The index of link to be selected

 

Example:

    int linkIndex = 10;

    int linkCount = getLinkCount();

   

    if (linkIndex < linkCount) {

        selectLink(linkIndex);

    }

 

Ready

String linkTest (

  double x,

  double y,

  String[] urlStrings

);

Check if coordinate (x, y) contains a link.

Parameters:

X

x coordinate in the device coordinate system

y

y coordinate in the device coordinate system

urlStrings

The OUTPUT parameter array to get the link URL

 

Returns:

0 : There in NO link in (x, y)

1 : There is a EXTERNAL link in (x, y) and the URL will be return via urlStrings, please aware of that urlStrings should at least contain one element and can’t be a null pointer.

2 : There is a INTERNAL link in (x, y) and the internal cursor has been change to target location, the screen is need to be refreshed (call getCurrentPage() ).

 

Example:

    String[] urlStrings = new String[1];

    int result = linkTest(x, y, urlStrings);

    if (result == 1) {

        Log.d(TAG, "External link, url=" + urlStrings[0]);

    } else if (result == 2) {

        Log.d(TAG, "Internal link");

    }

 

 

Ready

Search

boolean goText (

  String netext

);

Query the given text and highlight it with selection type highlight.

If there is not text found , returns false.

 

Parameters:

nettext 

String been searched

 

Returns:

True / False

 

Example:

    String text = "adobe";

    boolean found = false;

 

    if (found) {

        Log.d(TAG, "The text is found!");

    } else {

        Log.d(TAG, "The text is not found!");

    }

 

Ready

boolean findNextText (

  String text

);

Query the given text in forward order, starts from position of last found and highlight it with selection type.

If there is not text found , returns false.

 

Parameters:

text 

String been searched

 

Returns:

True / False

 

Ready

boolean findPreviousText (

  String text

);

Query the given text in backward order, starts from position of last found and highlight it with selection type.

If there is not text found , returns false.

 

Parameters:

text 

String been searched

 

Returns:                                                                          True / False

 

Ready

boolean resetFindText();

Cancel find processing and reset the “Find Location”[2].

Ready

int compare (

  String bookmark1,

  String bookmark2

);

Compare two location by their position in the document.

Not all locations can be compared precisely. If value returned in precise variable is false, and returned value is zero, locations point approximately to the same position in the document (e.g. the same page).

Comparison operation can be fairly expensive. Only Locations that originated from the same document can be compared.

 

Parameters:

bookmark1

location to which should be compared

bookmark2 

location to which should be compared

 

Returns:

    0 - locations point to the same position; -1 - this comes first, 1 - other comes first

 

Example:

    String someLocation;

    String currentLocation = getCurrentLocation();

    int result = compare(someLocation, currentLocation);

 

    if (result == 1) {

        Log.d(TAG, "someLocation first!");

    } else if (result == -1) {

        Log.d(TAG, "currentLocation first!");

    } else {

        Log.d(TAG, "The same!");

    }

 

Ready

String hitTest (

  double x1,

  double y1

);

Retrieve document location which best corresponds to x and y coordinates is stored there.

Parameters:

X1

x coordinate in the device coordinate system

y1

y coordinate in the device coordinate system

 

Returns:

        Location (bookmark) in String format.

 

Example:

    String hitLocation = hitTest (x, y);

 

 

Ready

String findNextMark();

Find next mark

Todo

String findPreviousMark();

Find previous mark

Todo

SearchResult[] getSearchResult (

    String Text,

  int max,

  int cont

);

 

Search word(s) from the beginning of the document, and return a list of SearchResult array which contains

    public class SearchResult {

        public String text;

        public String start_pos;

        public String end_pos;

}

If there is not text found , returns null.

 

Parameters:

text 

String being searched

max

Max array size of return object

cont

0 : Searching from the beginning of the document
1 : continue from last search

 

Returns:

    Null or an array of SearchResult object.

 

Note:

    Parameter ‘cont’ will be influence by function calls such as findNextText, findPreviousText, etc.

Ready

Book

String getMetaData (

  String name

);

Extracts named metadata item from the document.

To query metadata, Dublin Core names should be used, e.g.:

"DC.title" - title of the document

"DC.creator" - who created the content (author)

"DC.date" - when the document was created

Note the casing of the prefix and element names. These are taken from http://dublincore.org/documents/dc-html/ and DC prefix is considered to be predefined (as OPF and PDF lack ability to define it).

Note on EPUB metadata: Metadata recorded using opf:meta element can be queried simply using name attribute value. Custom-namespace metadata elements are not supported by this API.

Some metadata items can have additional attributes such as language (xml:lang) or type (xsi:type). These are returned through attrs parameter in whitespace-separated sequence of attribute/value pairs (in the form attr=value).

 

Parameters:

name

metadata name, UTF8-encoded

 

Returns:

    UTF8-encoded value of metadata, NULL if it does not exist

 

Example:

    String title = getMetaData("DC.title"),

    String creator = getMetaData("DC.creator"),

    String identifier = getMetaData("DC.identifier");

    String date = getMetaData("DC.date");

 

Ready

Chapter

int getNumChapters ();

Get total number of chapters available in current viewed document.

 

Returns:

    Number of chapters available in current document.

 

Example:

    int numberOfChapter = getNumChapters();

 

Ready

String[] getChapterList ();

Query the document for a list of chapters available.

   

Returns:

    A String array represents a list of chapters.

 

Example:

    String[] chapterList = getChapterList();

 

Ready

int goToChapterIndex (

  int chapterIndex

);

Because the total number of chapter is fixed according to TOCs, so the user can utilize this function to jump to any chapter by index.

 

Parameters:

chapterIndex

Chapter index where user wants to browse 

 

Returns:

STATE_MESSAGE_OK

0

OK

STATE_FATAL_UNKNOWN

-1

There was an error while switching chapter.

Unknown fatal error.

STATE_ERROR_UNKNOWN

-2

There was an error while switching chapter.

Unknown error.

STATE_WARN_UNKNOWN

-3

There was an error while switching chapter.

Unknown warning.

STATE_FATAL_PDF_T3_DOC_EXCEPTION

-200

There was an error while switching chapter.

Reading PDF file error. The file is broken.

STATE_ERROR_PDF_T3_DOC_EXCEPTION

-210

There was an error while switching chapter.

Reading PDF file error.

STATE_FATAL_PKG_XML_PARSE_ERROR

-300

There was an error while switching chapter.

Reading EPUB file error. The file is broken.

STATE_ERROR_PKG_XML_PARSE_ERROR

-310

There was an error while switching chapter.

Reading EPUB file error.

 

Example:

    int chapterIndex = 10;

    int numberOfChapters = getNumChapters();

   

    if (chapterIndex < numberOfChapters) {

        goToChapterIndex(chapterIndex);

    }

 

Ready

int goToChapter (

  String chapter

);

Jump to the specified chapter by name.

 

Parameters:

chapter

Chapter title where user wants to browse 

 

Returns:

STATE_MESSAGE_OK

0

OK

STATE_FATAL_UNKNOWN

-1

There was an error while switching chapter.

Unknown fatal error.

STATE_ERROR_UNKNOWN

-2

There was an error while switching chapter.

Unknown error.

STATE_WARN_UNKNOWN

-3

There was an error while switching chapter.

Unknown warning.

STATE_FATAL_PDF_T3_DOC_EXCEPTION

-200

There was an error while switching chapter.

Reading PDF file error. The file is broken.

STATE_ERROR_PDF_T3_DOC_EXCEPTION

-210

There was an error while switching chapter.

Reading PDF file error.

STATE_FATAL_PKG_XML_PARSE_ERROR

-300

There was an error while switching chapter.

Reading EPUB file error. The file is broken.

STATE_ERROR_PKG_XML_PARSE_ERROR

-310

There was an error while switching chapter.

Reading EPUB file error.

 

Example:

    int chapterIndex = 10;

    int numberOfChapters = getNumChapters();

    String[] chapterList = getChapterList();

   

    if (chapterIndex < numberOfChapters) {

        goToChapter (chapterList[chapterIndex]);

    }

 

Ready

double getChapterPagePositionFromIndex (

  int idx

);

Because the total number of chapter is fixed according to TOCs, so the user can utilize this function to get any position of chapter by index.[1]

 

Example:

    int chapterIndex = 10;

    int numberOfChapters = getNumChapters();

    double pagePosition;

 

    if (chapterIndex < numberOfChapters) {

        pagePosition = getChapterPagePositionFromIndex (

            chapterIndex

        );

    }

 

Ready

double getChapterPagePosition (

  String title

);

Get the chapter position by name.

 

Example:

    int chapterIndex = 10;

    int numberOfChapters = getNumChapters();

    String[] chapterList = getChapterList();

    double pagePosition;

 

    if (chapterIndex < numberOfChapters) {

        pagePosition = getChapterPagePosition (

            chapterList[chapterIndex]

        );

    }

 

Ready

int getCurrentChapterIndex ();

Get the chapter index by page current location. Be aware of that if there are more than one chapter locate in the same page, for example if Chapter 1(index=1) and Chapter 1.1(index=2) both locate in page 10, then the function may return the index of chapter 1(index=1) or chapter 1.1(index=2). In order to find the next chapter, the user have to use getChaperPagePositionFromIndex() to get the current chapter position and keep finding the next chapter position until different position is found.

 

Example:

    int currentIndex = getCurrentChapterIndex();

 

Ready

Page

int getNumPages();

Get the total number of pages

 

Example:

    int numberOfPages = getNumPages();

 

Ready

int getPage (

  int pageno,

  int[] mypage_buf

);

Get specified “PageBuffer” by page number.

 

Returns:

STATE_MESSAGE_OK

0

OK

STATE_FATAL_UNKNOWN

-1

There was an error while rendering page.

Unknown fatal error.

STATE_ERROR_UNKNOWN

-2

There was an error while rendering page.

Unknown error.

STATE_WARN_UNKNOWN

-3

There was an error while rendering page.

Unknown warning.

STATE_FATAL_PDF_T3_DOC_EXCEPTION

-200

There was an error while rendering page.

Reading PDF file error. The file is broken.

STATE_ERROR_PDF_T3_DOC_EXCEPTION

-210

There was an error while rendering page.

Reading PDF file error.

STATE_FATAL_PKG_XML_PARSE_ERROR

-300

There was an error while rendering page.

Reading EPUB file error. The file is broken.

STATE_ERROR_PKG_XML_PARSE_ERROR

-310

There was an error while rendering page.

Reading EPUB file error.

 

Example:

    int width = 600;

    int height = 800;

    int pageNo = 100;

    int[] pageBuffer = new int[width * height];

 

    getPage(pageNo, pageBuffer);

 

Ready

boolean getNextPage();

Return true if the book has next page, return false elsewise.

Ready

boolean getPreviousPage();

Return true if the book has previous page, return false elsewise.

Ready

int getCurrentPage (

  int[] pagebuf

);

Get “PageBuffer” of current page.

 

Returns:

STATE_MESSAGE_OK

0

OK

STATE_FATAL_UNKNOWN

-1

There was an error while rendering page.

Unknown fatal error.

STATE_ERROR_UNKNOWN

-2

There was an error while rendering page.

Unknown error.

STATE_WARN_UNKNOWN

-3

There was an error while rendering page.

Unknown warning.

STATE_FATAL_PDF_T3_DOC_EXCEPTION

-200

There was an error while rendering page.

Reading PDF file error. The file is broken.

STATE_ERROR_PDF_T3_DOC_EXCEPTION

-210

There was an error while rendering page.

Reading PDF file error.

STATE_FATAL_PKG_XML_PARSE_ERROR

-300

There was an error while rendering page.

Reading EPUB file error. The file is broken.

STATE_ERROR_PKG_XML_PARSE_ERROR

-310

There was an error while rendering page.

Reading EPUB file error.

 

Example:

    int width = 600;

    int height = 800;

    int[] pageBuffer = new int[width * height];

 

    getCurrentPage(pageBuffer);

 

Ready

String getCurrentLocation();

Get the current location(bookmark).

 

Example:

    String currentLocation = getCurrentLocation();

 

Ready

int goToLocation (

  String bookmark

);

Jump to the specified location(bookmark).

 

Parameters:

bookmark

Bookmark where user wants to jump to.

  

Returns:

STATE_MESSAGE_OK

0

OK

STATE_FATAL_UNKNOWN

-1

There was an error while navigating page.

Unknown fatal error.

STATE_ERROR_UNKNOWN

-2

There was an error while navigating page.

Unknown error.

STATE_WARN_UNKNOWN

-3

There was an error while navigating page.

Unknown warning.

STATE_ERROR_NULL_BOOKMARK

-111

There was an error while navigating page.

Invalid bookmark.

STATE_FATAL_PDF_T3_DOC_EXCEPTION

-200

There was an error while navigating page.

Reading PDF file error. The file is broken.

STATE_ERROR_PDF_T3_DOC_EXCEPTION

-210

There was an error while navigating page.

Reading PDF file error.

STATE_FATAL_PKG_XML_PARSE_ERROR

-300

There was an error while navigating page.

Reading EPUB file error. The file is broken.

STATE_ERROR_PKG_XML_PARSE_ERROR

-310

There was an error while navigating page.

Reading EPUB file error.

 

Example:

    String someLocation;

    goToLocation(someLocation);

 

 

Ready

int goToPosition (

  double position

);

Jump to the specified location(position).

 

Parameters:

position

Position where user wants to jump to.

  

Returns:

STATE_MESSAGE_OK

0

OK

STATE_FATAL_UNKNOWN

-1

There was an error while navigating page.

Unknown fatal error.

STATE_ERROR_UNKNOWN

-2

There was an error while navigating page.

Unknown error.

STATE_WARN_UNKNOWN

-3

There was an error while navigating page.

Unknown warning.

STATE_ERROR_NEGATIVE_POSITION

-112

There was an error while navigating page.

Invalid position.

STATE_FATAL_PDF_T3_DOC_EXCEPTION

-200

There was an error while navigating page.

Reading PDF file error. The file is broken.

STATE_ERROR_PDF_T3_DOC_EXCEPTION

-210

There was an error while navigating page.

Reading PDF file error.

STATE_FATAL_PKG_XML_PARSE_ERROR

-300

There was an error while navigating page.

Reading EPUB file error. The file is broken.

STATE_ERROR_PKG_XML_PARSE_ERROR

-310

There was an error while navigating page.

Reading EPUB file error.

 

Example:

    double pagePosition = 50.0

    goToPosition(pagePosition);

 

 

Ready

double getPagePosition (

  String bookmark

);

Convert the location(bookmark) to position.

 

Example:

    String someLocation;

    double pagePosition = getPagePosition(someLocation);

 

 

Ready

String getSummaryByLocation (

    String bookmark

);

Retrieve document context based on given bookmark input

Parameters:

bookmark

Bookmark to search for.

 

Returns:

String represents context.

 

Ready

 

 

 

 

 

RMSDK Status Code List

Group

Description

Name

Value

Description

Message

The operation is success, no error happened. Non-zero value is used to carry more information about the current state.

STATE_MESSAGE_OK

0

No error.

STATE_MESSAGE_HAS_EXTERNAL_LINK 

1

The target location contains external location.

STATE_MESSAGE_HAS_INTERNAL_LINK

2

The target location contains internal location.

STATE_MESSAGE_PDF_T3_RENDERING_EVENT

3

Error event during document rendering

Unknown

An error is happened, but not classified.

STATE_FATAL_UNKNOWN

-1

Un-cached error message, and the severity level is FATAL.

STATE_ERROR_UNKNOWN

-2

Un-cached error message, and the severity level is ERROR.

STATE_WARN_UNKNOWN

-3

Un-cached error message, and the severity level is WARNING.

System

The error is related to system or engine.

STATE_ERROR_DOC_NOT_INIT

-100

Document object is not initialized yet, probably openFile is missing or doing any operation before successfully calling openFile()

STATE_FATAL_SYS_NOT_INIT

-101

System not initialized.

STATE_FATAL_SYS_INIT_FAIL

-102

System initialize fail.

STATE_FATAL_PREVIOUS_FILE_NOT_CLOSED

-103

Previous file is not closed.

STATE_FATAL_FILE_NOT_EXIST

-110

This file cannot be found.

STATE_ERROR_NULL_BOOKMARK

-111

Invalid bookmark.

STATE_ERROR_NEGATIVE_POSITION

-112

Invalid position.

STATE_ERROR_NULL_PASSHASH

-113

Invalid Pass Hash.

STATE_WARN_DEVICE_NOT_ACTIVATE

-120

The device not activated before.

STATE_WARN_DEVICE_ALREADY_ACTIVATED

-121

The device already activated.

STATE_ERROR_STREAM_CURL

-130

Error in URL operation

STATE_ERROR_PKG_RESOURCE_TOO_LONG

-140

The PDF page size is too large.

STATE_ERROR_PKG_COMPRESSED_SIZE_TOO_BIG

-150

The EPUB page size is too large.

STATE_ERROR_PKG_ARTIFICIAL_PAGE_BREAKS

-160

The EPUB page size is too large.

STATE_WARN_PKG_BAD_REF

-170

The reference of package is wrong.

PDF

An error happened when rendering PDF file.

STATE_FATAL_PDF_T3_DOC_EXCEPTION

-200

Reading PDF file error. The file is broken.

STATE_ERROR_PDF_T3_DOC_EXCEPTION

-210

Reading PDF file error.

EPUEB

An error happened when rendering EPUB file.

STATE_FATAL_PKG_XML_PARSE_ERROR

-300

Reading EPUB file error. The file is broken.

STATE_ERROR_PKG_XML_PARSE_ERROR

-310

Reading EPUB file error.

DRM

DRM-related errors

STATE_ERROR_PASSHASH_NOT_FOUND

-400

The EPUB file is pass-hash protected, need correct pass hash code to open it

STATE_ERROR_PASSHASH_NO_URL

-405

Unable to get operator URL.

STATE_ERROR_PASSHASH_OP_FAIL

-406

Pass Hash error.

STATE_ERROR_PDF_T3_NEED_PASSWORD

-410

The PDF file is password protected, need correct password to open it

STATE_ERROR_PDF_EMPTY_PASSWORD

-420

The empty password is not allowed.

STATE_ERROR_AUTHENTICATION_FAIL

-430

The given authentication information (user name, password, tc) failed to authenticate the target document (PDF/ePUB)

STATE_ERROR_USER_NOT_ACTIVATED

-440

Device need to be activated before using.

STATE_ERROR_NO_VALID_LICENSE

-450

Activation license is not valid

STATE_ERROR_CORE_EXPIRED

-451

Load book has been expired, and should not be open for display

STATE_ERROR_CORE_LOAN_NOT_ON_RECORD

-452

The loan book had been return by ADE, and no longer be available on device.

 

 

[1] There are two kind of structure to represent LOCATION, the first one is BOOKMARK which is represented by a string value, the second one is POSITION which is represent by a double.

[2] When the SEARCH related function is call the Adobe Engine will keep the latest “Find Location” in memory, next time when the SEARCH related function is called again this location will be used as a start location.

*PLEASE don’t have ‘android:debuggable=”true’’ attribute in your <application> element, this will causes some RMSDK operations fail. This issue should be fixed soon.

*NOTE: the default resolution of screen has been change to 600*800, please make sure there is enough page buffer while calling API.