File Import
You can import images or PDF files into Docutain and do a bunch of things with them, same as after a successful document scan with Docutain's Cordova Scanner SDK.
Supported file types
- BMP
- JPG
- JPEG
- PNG
- TIFF
- HEIC
Initialization
Initialize the Docutain Cordova SDK as described here.
File Import
If you want to create a searchable PDF (includes text), or get the detected data or text of the imported file, use loadFile
- Cordova Promisify
- Cordova Callback
try{
await DocutainSDKPromisify.loadFile(filePath)
//generate a PDF from the imported file
const pdfUri = await DocutainSDK.writePDF('A4')
}catch (error) {
//error occured
console.error(error);
}
DocutainSDK.loadFile(filePath, function (result) {
//generate a PDF from the imported file
const pdfUri = await DocutainSDK.writePDF('A4')
}, error);