Skip to main content

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.

Cordova PDF Creation

Cordova Text Detection

Cordova Data Extraction

Supported file types

  • PDF
  • 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

    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);
}