PdfPage class Null safety

Provides methods and properties to create PDF pages and its elements, PdfPage.

//Create a new PDF documentation
PdfDocument document = PdfDocument();
//Create a new PDF page and draw the text
document.pages.add().graphics.drawString(
    'Hello World!!!',
    PdfStandardFont(PdfFontFamily.helvetica, 27),
    brush: PdfBrushes.darkBlue,
    bounds: const Rect.fromLTWH(170, 100, 0, 0));
//Save the document.
List<int> bytes = await document.save();
//Dispose the document.
document.dispose();

Constructors

PdfPage()
Initializes a new instance of the PdfPage class.

Properties

annotations PdfAnnotationCollection
Gets a collection of the annotations of the page- Read only.
read-only
defaultLayer PdfPageLayer
Gets the default layer of the page (Read only).
read-only
defaultLayerIndex int
Gets or sets index of the default layer (Read only).
read-only
formFieldsTabOrder PdfFormFieldsTabOrder
Gets or sets the tab order type for form fields
read / write
graphics PdfGraphics
Gets the graphics of the defaultLayer.
read-only
hashCode int
The hash code for this object.
read-onlyinherited
layers PdfPageLayerCollection
Gets the collection of the page's layers (Read only).
read-only
rotation PdfPageRotateAngle
Gets or sets the rotation of PDF page
read / write
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
size Size
Gets size of the PDF page- Read only
read-only

Methods

createTemplate() PdfTemplate
Creates a template from the page content.
getClientSize() Size
Get the PDF page size reduced by page margins and page template dimensions.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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