gpt4 book ai didi

c# - 带有超链接的 itextsharp 图像

转载 作者:行者123 更新时间:2023-11-30 21:04:39 26 4
gpt4 key购买 nike

我使用 itextsharp 库和 C# 创建了一个带有图像的 pdf。现在我需要在该图像上有一个超链接,以便在单击它时转到特定站点。我该怎么做?我试图找到链接到图像对象的属性,但找不到。

最佳答案

您必须使用 Anchor

Chunk cImage = new Chunk(yourImage, 0, 0, false); 
Anchor anchor = new Anchor(cImage);
anchor.Reference = "www.yourAddress.com";
document.Add(anchor);

关于c# - 带有超链接的 itextsharp 图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12238966/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com