PdfiumWrap class

Wrapper class to abstract the PDFium logic

Constructors

PdfiumWrap({String? libraryPath, Allocator allocator = calloc})
Default constructor to use the class

Properties

allocator Allocator
final
bitmap Pointer<fpdf_bitmap_t__>?
getter/setter pair
buffer Pointer<Uint8>?
getter/setter pair
config Pointer<FPDF_LIBRARY_CONFIG>
PDFium configuration
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
pdfium PDFiumBindings
Bindings to PDFium
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

closeDocument() PdfiumWrap
Closes the document if it was open. Returns a instance of PdfiumWrap
closePage() PdfiumWrap
Closes the page if it was open. Returns a instance of PdfiumWrap
dispose() → void
Destroys and releases the memory allocated for the library when is not longer used
getPageCount() int
Returns the number of pages of the loaded document.
getPageHeight() double
Returns the height of the loaded page.
getPageWidth() double
Returns the width of the loaded page.
loadDocumentFromBytes(Uint8List bytes, {String? password}) PdfiumWrap
Loads a document from bytes, and if necessary, a password can be specified.
loadDocumentFromPath(String path, {String? password}) PdfiumWrap
Loads a document from path, and if necessary, a password can be specified.
loadPage(int index) PdfiumWrap
Loads a page from a document loaded
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
renderPageAsBytes(int width, int height, {int backgroundColor = 268435455, int rotate = 0, int flags = 0}) Uint8List
Create empty bitmap and render page onto it The bitmap always uses 4 bytes per pixel. The first byte is always double word aligned. The byte order is BGRx (the last byte unused if no alpha channel) or BGRA. flags FPDF_ANNOT | FPDF_LCD_TEXT
savePageAsJpg(String outPath, {int? width, int? height, int backgroundColor = 268435455, double scale = 1, int rotate = 0, int flags = 0, bool flush = false, int qualityJpg = 100}) PdfiumWrap
Saves the loaded page as jpg image
savePageAsPng(String outPath, {int? width, int? height, int backgroundColor = 268435455, double scale = 1, int rotate = 0, int flags = 0, bool flush = false, int pngLevel = 6}) PdfiumWrap
Saves the loaded page as png image
toString() String
A string representation of this object.
inherited

Operators

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