Skip to main content

Installation

The MobbSign Web SDK is a JavaScript component, distributed as the npm package @mobbeel/mobbsign. It renders a PDF viewer inside an iframe in your web application and captures the signature with the touchscreen of the device. Documents are stored and signed by MobbSign Server.

Requirements​

MobbSign Server
API key and App IDProvided by Mobbeel.
npm token
Access token for the Mobbeel packagesProvided by Mobbeel.
Tooling
Node.jsnpm
Devices
TouchscreenDevices without a touchscreen are blocked by default.

Supported browsers​

PlatformMinimum versions
AndroidChrome 76 · Firefox 60 · Samsung Internet 7 · Android Browser 4.4
iOS / iPadOSiOS 10.3 · Safari 11 · Chrome 76 · Firefox 60 · Opera 16
macOSSafari 11 · Chrome 76 · Firefox 60 · Opera 56
WindowsEdge 40 · Chrome 76 · Firefox 60 · Opera 40

1. Configure the npm token​

Add the token to the .npmrc file in the root of your project (create the file if it does not exist):

.npmrc
//registry.npmjs.org/:_authToken=YOUR_NPM_TOKEN

Do not commit the token: add .npmrc to .gitignore, or read the token from an environment variable in your CI pipeline.

2. Install the package​

npm install --save @mobbeel/mobbsign

3. Publish the assets​

The package contains files that the browser must be able to download. Serve them from your web application, for example by copying them to your public assets folder in your build:

File or folderContents
mobbsign.jsThe SDK.
config.jsConfiguration of the viewer.
assets/css/styles.min.cssStyles of the component.
assets/img/Icons.
locales/Translations.

Include the style sheet in your application:

<link rel="stylesheet" href="assets/mobbsign/assets/css/styles.min.css" />

4. Import the SDK​

<script src="assets/mobbsign/mobbsign.js"></script>
<script>
new MobbSign({/* options */}).then((mobbsign) => mobbsign.load(documentId));
</script>

5. Add the container​

Add the element where the viewer will be rendered. It must have position: relative and a defined width and height:

<div id="mobbsign"></div>
#mobbsign {
position: relative;
width: 100%;
height: 80vh;
}

Next step​

Upload a document and sign it in the Quick start.