使用 iText7 (C#),有没有办法修改字段中的值以包含 href(链接到网站)?
我正在使用 iText7 for C# 开发原型。我使用的 PDF 是 XFAForm PDF,是在 Adobe Live Cycle Designer 中创建的。根据我的研究,XFAForms 不支持注释。我打算通过链接向该字段添加注释。
我希望能够编辑字段中的值以包含 URL。例如,
姓名:马克 应该是:
姓名:Marc https://www.google.com
我可以修改此字段中的值,但是没有运气添加可点击的 URL。我尝试过以下操作:
element.Add(new XAttribute("href",injectURL));
element is an XElement- Injecting HTML as the new value with a link
我正在考虑读取 XML、解析它并在 XML 中注入 URL,然后将其写回 PDF,但我认为这不是一个好的解决方案。
有人能够做到这一点吗?
I am working on a prototype using iText7 for C#. The PDF I am using is an XFAForm PDF and was created in Adobe Live Cycle Designer. From my research, XFAForms do not support annotations. I was going to add an annotation to the field with a link.
I want to be able to edit the value in a field to include a URL. For example,
Name : Marc
should be:
Name : Marc https://www.google.com
I am able to modify the value in this field, but no luck adding a URL that is clickable. I have tried the following:
element.Add(new XAttribute("href", injectedURL));
element is an XElement- Injecting HTML as the new value with a link
I was thinking about reading the XML, parsing it and injecting the URL in the XML and then writing it back to the PDF, but I do not feel that is a good solution.
Has anyone been able to do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论