Aspose.pdf for c# 创建透明超链接

发布时间:2020-07-21 17:48:22 作者:mathed001
来源:网络 阅读:874
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);
推荐阅读:
  1. Python如何快速处理PDF表格数据
  2. PDF Expert for mac(pdf编辑工具)

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

pdf 透明

上一篇:Python Tricks如何使用pywinrm远程控制Windows主机

下一篇:常见的PHP并发场景的解决方法

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》