PdfSection class

Represents a section entity. A section is a set of the pages with similar page settings.

//Create a new PDF documentation
PdfDocument document = PdfDocument();
//Create a new PDF section
PdfSection section = document.sections!.add();
//Create a new PDF page and draw the text
section.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();

Properties

hashCode int
The hash code for this object.
no setterinherited
pageAdded PageAddedCallback?
Event rises when the new page has been added
getter/setter pair
pages PdfPageCollection
Gets the collection of pages in this section.
no setter
pageSettings PdfPageSettings
Gets or sets the PdfPageSettings of the section.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
template PdfSectionTemplate
Gets or sets the PdfSectionTemplate for the pages in the section.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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