Skip to main content

PDF Creation

The Docutain SDK for iOS comes with the ability to create searchable and non-searchable PDF documents either from a scanned document with Docutain's Scanner SDK or imported file.

Initialization

Initialize Docutain's iOS SDK as described here.

Create a PDF

In order to create a PDF document, first a document needs to be scanned with Docutain's Scanner SDK or imported.

After that you can generate the PDF document.

import DocutainSdk

//...
//scan or import file
//...

if let pdfUrl = Document.writePDF(fileUrl: path, fileName: "Test"){
//do something with the generated pdf file
} else{
//error occured
let error = DocutainSDK.getLastError()
}
tip

You can specify the PDF page format by providing the appropriate value

let pdfUrl = Document.writePDF(fileUrl: path, fileName: "Test", pageFormat: .A4)