PdfImage class Null safety

Image object stored in the Pdf document

Constructors

PdfImage(PdfDocument pdfDocument, {required Uint8List image, required int width, required int height, bool alpha = true, PdfImageOrientation orientation = PdfImageOrientation.topLeft})
Creates a new PdfImage instance.
factory
PdfImage.file(PdfDocument pdfDocument, {required Uint8List bytes, PdfImageOrientation orientation = PdfImageOrientation.topLeft})
Create an image from an image file
factory
PdfImage.fromImage(PdfDocument pdfDocument, {required Image image, PdfImageOrientation orientation = PdfImageOrientation.topLeft})
Create an image from an im.Image object
factory
PdfImage.jpeg(PdfDocument pdfDocument, {required Uint8List image, PdfImageOrientation? orientation})
Create an image from a jpeg file
factory

Properties

buf → PdfStream
This holds the stream's content.
final, inherited
hashCode int
The hash code for this object. [...]
read-only, inherited
height int
Image height
read-only
isBinary bool
defines if the stream needs to be converted to ascii85
final, inherited
name String
Name of the image
read-only
objgen int
This is the generation number for this object.
final, inherited
objser int
This is the unique serial number for this object.
final, inherited
orientation PdfImageOrientation
The internal orientation of the image
final
params → PdfDict<PdfDataType>
This is the object parameters.
final, inherited
pdfDocument PdfDocument
This allows any Pdf object to refer to the document being constructed.
final, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
width int
Image width
read-only

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
prepare() → void
Prepare the object to be written to the stream
@mustCallSuper, inherited
ref() → PdfIndirect
Returns the unique serial number in Pdf format
inherited
toString() String
A string representation of this object. [...]
inherited
write(PdfStream os) → void
Writes the object to the output stream.
inherited
writeContent(PdfStream os) → void
inherited

Operators

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