PdfRectangleAnnotation constructor

  1. Rect bounds,
  2. String text,
  3. {PdfColor? color,
  4. PdfColor? innerColor,
  5. PdfAnnotationBorder? border,
  6. String? author,
  7. String? subject,
  8. double? opacity,
  9. DateTime? modifiedDate,
  10. List<PdfAnnotationFlags>? flags,
  11. bool? setAppearance}

Initializes new instance of the PdfRectangleAnnotation with bounds, text, border, color, innerColor, author, rotate, subject, modifiedDate, and flags.

PdfDocument document = PdfDocument();
PdfPage page = document.pages.add();
PdfRectangleAnnotation rectangleAnnotation = PdfRectangleAnnotation(
    const Rect.fromLTWH(0, 30, 80, 80), 'SquareAnnotation',
    innerColor: PdfColor(255, 0, 0), color: PdfColor(255, 255, 0));
List<int> bytes = await document.save();


PdfRectangleAnnotation(Rect bounds, String text,
    {PdfColor? color,
    PdfColor? innerColor,
    PdfAnnotationBorder? border,
    String? author,
    String? subject,
    double? opacity,
    DateTime? modifiedDate,
    List<PdfAnnotationFlags>? flags,
    bool? setAppearance}) {
  _helper = PdfRectangleAnnotationHelper(this, bounds, text,
      color: color,
      innerColor: innerColor,
      border: border,
      author: author,
      subject: subject,
      modifiedDate: modifiedDate,
      opacity: opacity,
      flags: flags,
      setAppearance: setAppearance);