Android
ComPDFKit Conversion SDK
Get Started

How to Make an Android App with ComPDFKit Conversion SDK

 

You can try ComPDFKit Conversion SDK in a few simple steps and get the library up and running in your app with little to no effort.

 

- Use Android Studio to create a Phone & Tablet project in Kotlin.

- Copy ComPDFkitConversion.aar to the Lib directory of the app.

- Add the following code into the app’s build.gradle file.

 

android{
	   ...
	   	
		defaultConfig {
		    ...
		    ndk {
		        abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
		    }
		}
	   	 
	   	...
	   	 
	   	compileOptions {
	        sourceCompatibility JavaVersion.VERSION_1_8
	        targetCompatibility JavaVersion.VERSION_1_8
	    }
	    
	    kotlinOptions {
	        jvmTarget = '1.8'
	    }
}
   
   dependencies {
   		implementation(fileTree('libs'))
   		//implementation fileTree(dir: 'libs', includes: ['*.aar'])
   		//implementation(name: 'ComPDFKitConversion', ext: 'aar')
   	 	...
}

 

- Apply for read and write permissions in AndroidManifest.xml.

 

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

 

- Add the following code into the app’s build.gradle file. Add this license in the AndroidManifest.xml of the main module.

 

<meta-data
	android:name="CPDFConverter_key"
	android:value="" />
<meta-data
	android:name="CPDFConverter_secret"
	android:value="" />