addUriAnnotationTopLeft method
Adds a URI annotation using top-left coordinates.
Implementation
PdfDocument addUriAnnotationTopLeft({
required int pageNumber,
required double left,
required double top,
required double width,
required double height,
required String uri,
}) {
final pageIndex = pageNumber - 1;
if (pageIndex < 0 || pageIndex >= pdfPageList.pages.length) {
throw RangeError.index(pageIndex, pdfPageList.pages, 'pageNumber');
}
final page = pdfPageList.pages[pageIndex];
final bounds = _rectFromTopLeft(
page,
left: left,
top: top,
width: width,
height: height,
);
PdfAnnot(page, PdfUriAnnotation(bounds: bounds, uri: uri));
return this;
}