Getting Started

System requirements

  • Windows, Mac or Linux

  • Android Studio

Adding the SDK to your project

In order to use the SmartOffice SDK in your app you need to use the Gradle build system to import the library dependcies.

SmartOffice libraries can be retrieved as pre-built artifacts from a local app/libs folder location relative to your Android project. Your Android project’s module build.gradle should add this location.

You should have been supplied library items specific to SmartOffice within libs as follows:

  • editor.aar

  • mupdf.aar

  • phoenix.aar

  • sodk_resources.aar

  • solib.aar

  • wheel.aar

Your gradle file dependencies

To add the libraries to your project add the dependencies section in your Module build.gradle as follows:

implementation fileTree(dir: 'libs', include: ['*.aar'])

As well as these standaard SmartOffice libraries your gradle dependencies file will also need the following:

implementation 'androidx.navigation:navigation-fragment-ktx:2.5.1'
implementation 'androidx.navigation:navigation-ui-ktx:2.5.1'

Note

The exact version of the androidx.navigation modules may depend on your other dependency versions.

Verify your integration

To ensure you have correctly added the libraries project, synchronize your project to ensure that any changes to your build.gradle are applied and then ensure that your source code files can reference import com.artifex.solib without error.

import com.artifex.solib.*

Check the version

Once you have successfully integrated the libraries the build version details can be checked from an Activity as follows:

val versionInfo:Array<String>? = SOLib.getLib(activity).versionInfo

if (versionInfo != null) {
    val releaseDate = versionInfo[0]
    val issue = versionInfo[1]
    val version = versionInfo[2]
    val customer = versionInfo[3]
}

Configuration Options

Before loading a document SmartOffice configuration options must be defined for your application. Without these being defined the application will throw an exception.

Early on in the lifecycle of your app instantiate configuration options as follows:

import com.artifex.solib.ConfigOptions

val configOptions: ConfigOptions = ConfigOptions()
ArDkLib.setAppConfigOptions(configOptions)

Configuration options can be tailored to suit your application requirements. To do so set the required Boolean value against the Configuration option variable you need.

Available configuration options

Note some of settings will only apply to the visibility of UI buttons in the Default UI.

Variable

Type

Only for Default UI

Notes

isEditingEnabled

Boolean

no

Enable or disable editing.

isSaveAsEnabled

Boolean

yes

Enable or disable save as.

isSaveAsPdfEnabled

Boolean

yes

Enable or disable save as PDF.

isOpenInEnabled

Boolean

yes

Enable or disable open in.

isOpenPdfInEnabled

Boolean

yes

Enable or disable open as a PDF.

isShareEnabled

Boolean

yes

Enable or disable sharing.

isExtClipboardInEnabled

Boolean

no

Enable or disable clipboard paste.

isExtClipboardOutEnabled

Boolean

no

Enable or disable clipboard copy.

isPrintingEnabled

Boolean

yes

Enable or disable printing.

isLaunchUrlEnabled

Boolean

no

Enable or disable external URL links from operating.

isDigitalSignaturesEnabled

Boolean

yes

Enable or disable digital signatures.

isESignaturesEnabled

Boolean

yes

Enable or disable e-signatures.

isFormFillingEnabled

Boolean

no

Enable or disable form filling.

isFormSigningFeatureEnabled

Boolean

no

Enable or disable form signing.

isRedactionsEnabled

Boolean

no

Enable or disable redactions.

isFullscreenEnabled

Boolean

yes

Enable or disable fullscreen mode.

isInvertContentInDarkModeEnabled

Boolean

no

Enable or disable dark mode content inversion.


This software is provided AS-IS with no warranty, either express or implied. This software is distributed under license and may not be copied, modified or distributed except as expressly authorized under the terms of that license. Refer to licensing information at artifex.com or contact Artifex Software Inc., 39 Mesa Street, Suite 108A, San Francisco CA 94129, United States for further information.