PdfDocumentLinkAnnotation constructor
PdfDocumentLinkAnnotation(
- Rect bounds,
- PdfDestination destination
Initializes new PdfDocumentLinkAnnotation instance with specified bounds and destination.
//Create a new Pdf document
PdfDocument document = PdfDocument();
//Create a document link and add to the PDF page.
document.pages.add().annotations.add(PdfDocumentLinkAnnotation(
Rect.fromLTWH(10, 40, 30, 30),
PdfDestination(document.pages.add(), Offset(10, 0))));
//Save the document.
List<int> bytes = await document.save();
//Dispose the document.
document.dispose();
Implementation
PdfDocumentLinkAnnotation(Rect bounds, PdfDestination destination) {
_helper = PdfDocumentLinkAnnotationHelper(this, bounds);
this.destination = destination;
}