createInstance static method
Creates a document channel instance that can open an existing PDF file.
Use createDocument when you want to create a new PDF document from scratch.
Implementation
static Future<CPDFDocument> createInstance() async {
final id = CpdfUuidUtil.generateShortUniqueId();
final success = await ComPDFKit.createDocumentInstance(id);
if (!success) {
throw Exception('Failed to create document instance');
}
return CPDFDocument._(id);
}