PdfTextWebLink constructor
PdfTextWebLink({})
Initializes a new instance of the PdfTextWebLink class.
//Create a new Pdf document
PdfDocument document = PdfDocument();
//Create and draw the web link in the PDF page
PdfTextWebLink(
url: 'www.google.co.in',
text: 'google',
font: PdfStandardFont(PdfFontFamily.timesRoman, 14),
brush: PdfSolidBrush(PdfColor(0, 0, 0)),
pen: PdfPens.brown,
format: PdfStringFormat(
alignment: PdfTextAlignment.center,
lineAlignment: PdfVerticalAlignment.middle))
.draw(document.pages.add(), Offset(50, 40));
//Save the document.
List<int> bytes = await document.save();
//Dispose the document.
document.dispose();
Implementation
PdfTextWebLink(
{required String url,
String? text,
PdfBrush? brush,
PdfFont? font,
PdfPen? pen,
PdfStringFormat? format}) {
_helper = PdfTextWebLinkHelper(this);
_initializeWebLink(text, font, pen, brush, format);
this.url = url;
}