subSuperscript property

PdfSubSuperscript subSuperscript
getter/setter pair

Gets and sets whether the text is in subscript or superscript mode.

//Create a new PDF document.
PdfDocument document = PdfDocument()
  ..pages.add().graphics.drawString(
      'Hello World!', PdfStandardFont(PdfFontFamily.helvetica, 12),
      bounds: Rect.fromLTWH(0, 0, 200, 100),
      format: PdfStringFormat(
          alignment: PdfTextAlignment.center,
          lineAlignment: PdfVerticalAlignment.middle,
          characterSpacing: 1,
          subSuperscript: PdfSubSuperscript.subscript));
//Save the document.
List<int> bytes = await document.save();
//Close the document.
document.dispose();

Implementation

late PdfSubSuperscript subSuperscript;