CPDFDocument class

A class to handle PDF documents without using CPDFReaderWidget

example:

var document = CPDFDocument();
document.open('pdf file path', 'password');

/// get pdf document info.
var info = await document.getInfo();

/// get pdf document file name.
var fileName = await document.getFileName();

Constructors

CPDFDocument.withController(int viewId)

Properties

hashCode int
The hash code for this object.
no setterinherited
isValid → dynamic
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

checkOwnerPassword(String password) Future<bool>
Whether the owner password is correct.
checkOwnerUnlocked() Future<bool>
Check if owner permissions are unlocked
exportAnnotations() Future<String>
Exports annotations from the current PDF document to an XFDF file.
getFileName() Future<String>
Gets the file name of the PDF document.
getPageCount() Future<int>
Get the total number of pages in the current document
getPermissions() Future<CPDFDocumentPermissions>
Gets the current document's permissions. There are three types of permissions: No restrictions: CPDFDocumentPermissions.none If the document has an open password and an owner password, using the open password will grant CPDFDocumentPermissions.user permissions, and using the owner password will grant CPDFDocumentPermissions.owner permissions.
hasChange() Future<bool>
Check the document for modifications
importAnnotations(String xfdfFile) Future<bool>
Imports annotations from the specified XFDF file into the current PDF document.
isEncrypted() Future<bool>
Checks if the PDF document is encrypted.
isImageDoc() Future<bool>
Checks if the PDF document is an image document. This is a time-consuming operation that depends on the document size.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
open(String filePath, String password) Future<CPDFDocumentError>
removeAllAnnotations() Future<bool>
Delete all comments in the current document
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited