GUIDE

GUIDE


B2BDoc API

'B2BDoc::B2BDocManagerObject' interface

Public Attributes

readonly attribute B2bDocManager b2bdoc



Details in English

Namespace forB2BDoc API.

Returns

B2BDoc API의 네임스페이스.

Version

1.0

Privilege Level

Public

Privilege

http://developer.samsung.com/privilege/b2bdoc

Product

B2B

Since

2.4

SDK Support

Y


'B2BDoc::B2BDocManager' interface

Public Methods

DOMString getVersion ( )
This interface provides methods to get doc module's version. More...

Public Methods

DOMString getVersion()

   This interface provides methods to get doc module's version.


Details in English

This interface provides methods to get doc module's version

Returns

Version of doc module

Exceptions

B2bAPIException
   with error type SecurityError, if the application does not have the privilege to call this method.
B2bAPIException
   with error type UnknownError in any other error case.
B2bAPIException
   with error type TypeMismatchError, Invalid ErrorCallback type passed for 'onerror' parameter
var Version = null;
try {
Version = b2bapis.b2bdoc.getVersion();
} catch (e) {
console.log("[getVersion] call syncFunction exception [" + e.code + "] name: " + e.name + " message: " + e.message);
}
if(null !== Version){
console.log("[getVersion] call syncFunction type: " + Version);
} 

Privilege Level

Public

Privilege

http://developer.samsung.com/privilege/b2bdoc

Version

1.0

Since

2.4

Product

B2B

SDK Support

Y


void openDoc(DOMString docpath, long rectX, long rectY, long rectWidth, long rectHeig, B2BDocSuccessCallback onSuccess, optional B2BDocErrorCallback ? onError)

   This interface provides methods to open doc.


Details in English

Prepare the Doc to play and set the necessary values for play

Returns

N/A

Parameters

docpath
   DOMString, doc path
rectX
   int, rect X
rectY
   int, rect Y
rectWidth
   int,Width
rectHeig
   int,Height
onSuccess
   Callback method to be invoked when this api success
onError
   Callback method to be invoked when an error occurs.

Exceptions

B2bAPIException
   with error type SecurityError, if the application does not have the privilege to call this method.
B2bAPIException
   with error type UnknownError in any other error case.
B2bAPIException
   with error type TypeMismatchError, Invalid ErrorCallback type passed for 'onerror' parameter
var onSuccess = function(val) {
console.log("[openDoc] success : " + val);
}
var onError = function(error) {
console.log("[openDoc] code :" + error.code + " error name: " + error.name + " message " + error.message);
}
console.log("[openDoc]");
b2bapis.b2bdoc.openDoc("http://107.109.202.6:80/1.PDF", 1000, 500, 800, 500, onSuccess, onError); 

Privilege Level

Public

Privilege

http://developer.samsung.com/privilege/b2bdoc

Version

1.0

Since

2.4

Product

B2B

SDK Support

Y


void closeDoc( B2BDocSuccessCallback onSuccess, optional B2BDocErrorCallback ? onError)

   This interface provides methods to close doc play.


Details in English

This interface provides methods to close doc play

Returns

N/A

Parameters

onSuccess
   Callback method to be invoked when this api success
onError
   Callback method to be invoked when an error occurs.

Exceptions

B2bAPIException
   with error type SecurityError, if the application does not have the privilege to call this method.
B2bAPIException
   with error type UnknownError in any other error case.
B2bAPIException
   with error type TypeMismatchError, Invalid ErrorCallback type passed for 'onerror' parameter
var onSuccess = function(val) {
console.log("[closeDoc] success : " + val);
}
var onError = function(error) {
console.log("[closeDoc] code :" + error.code + " error name: " + error.name + " message " + error.message);
}
console.log("[closeDoc]");
b2bapis.b2bcontrol.closeDoc(onSuccess, onError); 

Privilege Level

Public

Privilege

http://developer.samsung.com/privilege/b2bdoc

Version

1.0

Since

2.4

Product

B2B

SDK Support

Y


void playDoc(int val, B2BDocSuccessCallback onSuccess, optional B2BDocErrorCallback ? onError)

   This interface provides methods to play doc.


Details in English

This interface provides methods to play doc

Returns

N/A

Parameters

val
   int,Page slide time
onSuccess
   Callback method to be invoked when this api success
onError
   Callback method to be invoked when an error occurs.

Exceptions

B2bAPIException
   with error type SecurityError, if the application does not have the privilege to call this method.
B2bAPIException
   with error type UnknownError in any other error case.
B2bAPIException
   with error type TypeMismatchError, Invalid ErrorCallback type passed for 'onerror' parameter
var onSuccess = function(val) {
console.log("[playDoc] success : " + val);
}
var onError = function(error) {
console.log("[playDoc] code :" + error.code + " error name: " + error.name + " message " + error.message);
}
console.log("[playDoc]");
b2bapis.b2bdoc.playDoc(5, onSuccess, onError); 

Privilege Level

Public

Privilege

http://developer.samsung.com/privilege/b2bdoc

Version

1.0

Since

2.4

Product

B2B

SDK Support

Y


void stopDoc( B2BDocSuccessCallback onSuccess, optional B2BDocErrorCallback ? onError)

   This interface provides methods to stop doc play.


Details in English

This interface provides methods to stop doc paly

Returns

N/A

Parameters

onSuccess
   Callback method to be invoked when this api success
onError
   Callback method to be invoked when an error occurs.

Exceptions

B2bAPIException
   with error type SecurityError, if the application does not have the privilege to call this method.
B2bAPIException
   with error type UnknownError in any other error case.
B2bAPIException
   with error type TypeMismatchError, Invalid ErrorCallback type passed for 'onerror' parameter
var onSuccess = function(val) {
console.log("[stopDoc] success : " + val);
}
var onError = function(error) {
console.log("[stopDoc] code :" + error.code + " error name: " + error.name + " message " + error.message);
}
console.log("[stopDoc] ");
b2bapis.b2bdoc.stopDoc(onSuccess, onError); 

Privilege Level

Public

Privilege

http://developer.samsung.com/privilege/b2bdoc

Version

1.0

Since

2.4

Product

B2B

SDK Support

Y


void prevPageDoc( B2BDocSuccessCallback onSuccess, optional B2BDocErrorCallback ? onError)

   This interface provides methods to previous page of doc.


Details in English

This interface provides methods to previous page of doc

Returns

N/A

Parameters

onSuccess
   Callback method to be invoked when this api success
onError
   Callback method to be invoked when an error occurs.

Exceptions

B2bAPIException
   with error type SecurityError, if the application does not have the privilege to call this method.
B2bAPIException
   with error type UnknownError in any other error case.
B2bAPIException
   with error type TypeMismatchError, Invalid ErrorCallback type passed for 'onerror' parameter
var onSuccess = function(val) {
console.log("[prevPageDoc] success : " + val);
}
var onError = function(error) {
console.log("[prevPageDoc] code :" + error.code + " error name: " + error.name + " message " + error.message);
}
console.log("[prevPageDoc] ");
b2bapis.b2bdoc.prevPageDoc(onSuccess, onError); 

Privilege Level

Public

Privilege

http://developer.samsung.com/privilege/b2bdoc

Version

1.0

Since

2.4

Product

B2B

SDK Support

Y


void nextPageDoc( B2BDocSuccessCallback onSuccess, optional B2BDocErrorCallback ? onError)

   This interface provides methods to next page of doc.


Details in English

next page of doc

Returns

N/A

Parameters

onSuccess
   Callback method to be invoked when this api success
onError
   Callback method to be invoked when an error occurs.

Exceptions

B2bAPIException
   with error type SecurityError, if the application does not have the privilege to call this method.
B2bAPIException
   with error type UnknownError in any other error case.
B2bAPIException
   with error type TypeMismatchError, Invalid ErrorCallback type passed for 'onerror' parameter
var onSuccess = function(val) {
console.log("[nextPageDoc] success : " + val);
}
var onError = function(error) {
console.log("[nextPageDoc] code :" + error.code + " error name: " + error.name + " message " + error.message);
}
console.log("[nextPageDoc] ");
b2bapis.b2bdoc.nextPageDoc(onSuccess, onError); 

Privilege Level

Public

Privilege

http://developer.samsung.com/privilege/b2bdoc

Version

1.0

Since

2.4

Product

B2B

SDK Support

Y


void pauseDoc( B2BDocSuccessCallback onSuccess, optional B2BDocErrorCallback ? onError)

   This interface provides methods to pause doc.


Details in English

This interface provides methods to pause doc

Returns

N/A

Parameters

onSuccess
   Callback method to be invoked when this api success
onError
   Callback method to be invoked when an error occurs.

Exceptions

B2bAPIException
   with error type SecurityError, if the application does not have the privilege to call this method.
B2bAPIException
   with error type UnknownError in any other error case.
B2bAPIException
   with error type TypeMismatchError, Invalid ErrorCallback type passed for 'onerror' parameter
var onSuccess = function(val) {
console.log("[pauseDoc] success : " + val);
}
var onError = function(error) {
console.log("[pauseDoc] code :" + error.code + " error name: " + error.name + " message " + error.message);
}
console.log("[pauseDoc] ");
b2bapis.b2bdoc.pauseDoc(onSuccess, onError); 

Privilege Level

Public

Privilege

http://developer.samsung.com/privilege/b2bdoc

Version

1.0

Since

2.4

Product

B2B

SDK Support

Y


void resumeDoc( B2BDocSuccessCallback onSuccess, optional B2BDocErrorCallback ? onError)

   This interface provides methods to resume doc play.


Details in English

This interface provides methods to resume doc play

Returns

N/A

Parameters

onSuccess
   Callback method to be invoked when this api success
onError
   Callback method to be invoked when an error occurs.

Exceptions

B2bAPIException
   with error type SecurityError, if the application does not have the privilege to call this method.
B2bAPIException
   with error type UnknownError in any other error case.
B2bAPIException
   with error type TypeMismatchError, Invalid ErrorCallback type passed for 'onerror' parameter
var onSuccess = function(val) {
console.log("[resumeDoc] success : " + val);
}
var onError = function(error) {
console.log("[resumeDoc] code :" + error.code + " error name: " + error.name + " message " + error.message);
}
console.log("[resumeDoc] ");
b2bapis.b2bdoc.resumeDoc(onSuccess, onError); 

Privilege Level

Public

Privilege

http://developer.samsung.com/privilege/b2bdoc

Version

1.0

Since

2.4

Product

B2B

SDK Support

Y


void setVerticalDoc( B2BDocSuccessCallback onSuccess, optional B2BDocErrorCallback ? onError)

   This interface provides methods to vertical doc play.


Details in English

This interface provides methods to vertical doc play

Returns

N/A

Parameters

onSuccess
   Callback method to be invoked when this api success
onError
   Callback method to be invoked when an error occurs.

Exceptions

B2bAPIException
   with error type SecurityError, if the application does not have the privilege to call this method.
B2bAPIException
   with error type UnknownError in any other error case.
B2bAPIException
   with error type TypeMismatchError, Invalid ErrorCallback type passed for 'onerror' parameter
var onSuccess = function(val) {
console.log("[setVerticalDoc] success : " + val);
}
var onError = function(error) {
console.log("[setVerticalDoc] code :" + error.code + " error name: " + error.name + " message " + error.message);
}
console.log("[setVerticalDoc] ");
b2bapis.b2bdoc.setVerticalDoc(onSuccess, onError); 

Privilege Level

Public

Privilege

http://developer.samsung.com/privilege/b2bdoc

Version

1.0

Since

2.4

Product

B2B

SDK Support

Y


void gotoPageDoc(long page, B2BDocSuccessCallback onSuccess, optional B2BDocErrorCallback ? onError)

   This interface provides methods to go to page.


Details in English

Go to page directly

Returns

N/A

Parameters

page
   start page what user want to set
onSuccess
   Callback method to be invoked when this api success
onError
   Callback method to be invoked when an error occurs.

Exceptions

B2bAPIException
   with error type SecurityError, if the application does not have the privilege to call this method.
B2bAPIException
   with error type UnknownError in any other error case.
B2bAPIException
   with error type TypeMismatchError, Invalid ErrorCallback type passed for 'onerror' parameter
var onSuccess = function(val) {
console.log("[gotoPageDoc] success : " + val);
}
var onError = function(error) {
console.log("[gotoPageDoc] code :" + error.code + " error name: " + error.name + " message " + error.message);
}
console.log("[gotoPageDoc] ");
b2bapis.b2bdoc.gotoPageDoc(3, onSuccess, onError); 

Privilege Level

Public

Privilege

http://developer.samsung.com/privilege/b2bdoc

Version

1.0

Since

2.4

Product

B2B

SDK Support

Y


'B2BDoc::B2BDocSuccessCallback' interface

Public Methods

void onsuccess(B2BRESULT data)



Details in English

This method is callback parameter.

Returns

void

Parameters

data
   provide status

Exceptions

B2bAPIException
   with error type SecurityError, if the application does not have the privilege to call this method.
B2bAPIException
   with error type UnknownError in any other error case.
B2bAPIException
   with error type TypeMismatchError, Invalid ErrorCallback type passed for 'onerror' parameter
var onSuccess = function(val) {
console.log("[gotopageDoc] success : " + val);
}
var onError = function(error) {
console.log("[gotopageDoc] code :" + error.code + " error name: " + error.name + " message " + error.message);
}
console.log("[gotopageDoc] ");
b2bapis.b2bdoc.gotopageDoc(3, onSuccess, onError); 

Version

1.0

Since

2.4

Privilege Level

Public

Privilege

http://developer.samsung.com/privilege/b2bdoc

Product

B2B

SDK Support

Y


'B2BDoc::B2BDocErrorCallback' interface

Public Methods

void onerror( B2BERROR data)



Details in English

This method is callback parameter.

Returns

void
N/A

Exceptions

B2bAPIException
   with error type SecurityError, if the application does not have the privilege to call this method.
B2bAPIException
   with error type UnknownError in any other error case.
B2bAPIException
   with error type TypeMismatchError, Invalid ErrorCallback type passed for 'onerror' parameter
var onSuccess = function(val) {
console.log("[gotopageDoc] success : " + val);
}
var onError = function(error) {
console.log("[gotopageDoc] code :" + error.code + " error name: " + error.name + " message " + error.message);
}
console.log("[gotopageDoc] ");
b2bapis.b2bdoc.gotopageDoc(3, onSuccess, onError); 

Parameters

data
   provide status

Version

1.0

Since

2.4

Privilege Level

Public

Privilege

http://developer.samsung.com/privilege/b2bdoc

Product

B2B

SDK Support

Y



위로가기