您好,登錄后才能下訂單哦!
using Aspose; using Aspose.Pdf; using Aspose.Pdf.InteractiveFeatures.Annotations; using Aspose.Pdf.InteractiveFeatures; ......
Aspose.Pdf.Document doc = new Aspose.Pdf.Document(_pdfFilePath); ImagePlacementAbsorberabs = new ImagePlacementAbsorber(); //查找圖片 foreach (ImagePlacement p_w_picpathPlacement in abs.ImagePlacements) { XImage p_w_picpath = p_w_picpathPlacement.Image; } //創建超鏈接 LinkAnnotation link = new LinkAnnotation(page, new Aspose.Pdf.Rectangle(p_w_picpathPlacement.Rectangle.URX - 175, p_w_picpathPlacement.Rectangle.URY - 90, p_w_picpathPlacement.Rectangle.URX + 4, p_w_picpathPlacement.Rectangle.URY + 3)); link.Color = Aspose.Pdf.Color.FromRgb(System.Drawing.Color.Empty); //創建透明外框 link.Border = new Border(link); link.Border.Style = BorderStyle.Solid; link.Border.Effect = BorderEffect.None; link.Border.Width = 0; link.Action = new GoToRemoteAction(@"..\..\test.pdf", 1); //連接到其他文件 //link.Action = new Aspose.Pdf.InteractiveFeatures.GoToURIAction("www.google.com"); //網址超鏈接 page.Annotations.Add(link);
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。