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.


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
//error occured
var error = DocutainSDK.LastError;

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

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