PDFDoc class

Class representing a PDF document. In order to create a new PDFDoc instance, one of these static methods has to be used: PDFDoc.fromFile, PDFDoc.fromPath, PDFDoc.fromURL.

Properties

hashCode int
The hash code for this object.
no setterinherited
info PDFDocInfo
Gets the information of this document.
no setter
length int
Gets the number of pages of this document.
no setter
pages List<PDFPage>
Gets the pages of this document. The pages indexes start at 0, but the first page has number 1. Therefore, if you need to access the 5th page, you will do: var page = doc.pages4 print(page.number) -> 5
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
text Future<String>
Gets the entire text content of the document.
no setter

Methods

deleteFile() → void
Deletes the file related to this PDFDoc. Throws an exception if the FileSystemEntity cannot be deleted.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pageAt(int pageNumber) PDFPage
Gets the page of the document at the given page number.
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

deleteAllExternalFiles() Future
Deletes all the files of the documents that have been imported from outside the local file system (e.g. using fromURL).
fromFile(File file, {String password = ""}) Future<PDFDoc>
Creates a PDFDoc object with a File instance. Optionally, takes a password for encrypted PDF documents.
fromPath(String path, {String password = ""}) Future<PDFDoc>
Creates a PDFDoc object with a file path. Optionally, takes a password for encrypted PDF documents.
fromURL(String url, {String password = ""}) Future<PDFDoc>
Creates a PDFDoc object with a URL. Optionally, takes a password for encrypted PDF documents. It downloads the PDF file located in the given URL and saves it in the app's temporary directory.