Skip to main content

PDF Creation

The Docutain SDK for .NET MAUI 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 the Docutain SDK for .NET MAUI as described here.

Create a PDF

using Docutain.SDK.MAUI;

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

var destinationPath = FileSystem.CacheDirectory + "/TestPDF.pdf";
var pdfFile = Document.WritePDF(destinationPath);
if(pdfFile != null)
{
//do something with the generated pdf file
}
else
{
//error occured
var error = DocutainSDK.LastError;
}
tip

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

var pdfFile = Document.WritePDF(destinationPath, true, PDFPageFormat.A4);