public static void GetLinks(PdfDocument pdfDocument, int page)
{
//get annotations on page
IList
annotations = pdfDocument.GetPage(page).GetAnnotations();
//loop all onnotations
foreach (PdfAnnotation annotation in annotations)
{
if (annotation.GetSubtype() == PdfName.Link)
{
PdfArray sourceRect = annotation.GetRectangle();
//here i want to get the rectangle and pageno of the destination
//PdfArray destinationRect = ???
//int destinationPageNo = ???
}
}
}
может кто -нибудь указать пример кода, как это сделать?
Я хочу зацикливаться на всей внутренней ссылке (goto actions) на странице PDF и найти номер и прямоугольник.[code]public static void GetLinks(PdfDocument pdfDocument, int page) { //get annotations on page IList annotations = pdfDocument.GetPage(page).GetAnnotations();
//loop all onnotations foreach (PdfAnnotation annotation in annotations) { if (annotation.GetSubtype() == PdfName.Link) { PdfArray sourceRect = annotation.GetRectangle();
//here i want to get the rectangle and pageno of the destination //PdfArray destinationRect = ??? //int destinationPageNo = ??? } } } [/code] может кто -нибудь указать пример кода, как это сделать?