font property
Get or sets the font.
//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',
brush: PdfSolidBrush(PdfColor(0, 0, 0)),
pen: PdfPens.brown,
format: PdfStringFormat(
alignment: PdfTextAlignment.center,
lineAlignment: PdfVerticalAlignment.middle));
//Gets or sets the font
textWebLink.font = PdfStandardFont(PdfFontFamily.timesRoman, 14);
//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
PdfFont? font;