pen property

PdfPen? pen
getter/setter pair

Get or sets the pen.

//Create a new Pdf document
PdfDocument document = PdfDocument();
//Create the web link in the PDF page
PdfTextWebLink textWebLink = PdfTextWebLink(
    url: 'www.google.co.in',
    text: 'google',
    font: PdfStandardFont(PdfFontFamily.timesRoman, 14),
    brush: PdfSolidBrush(PdfColor(0, 0, 0)),
    format: PdfStringFormat(
        alignment: PdfTextAlignment.center,
        lineAlignment: PdfVerticalAlignment.middle));
//Gets or sets the pen
textWebLink.pen = PdfPens.brown;
//Draw the web link in the PDF page
textWebLink.draw(document.pages.add(), Offset(50, 40));
//Save the document.
List<int> bytes = await document.save();
//Dispose the document.
document.dispose();

Implementation

PdfPen? pen;