锚定到文档附件的链接 [英] Anchor link to document attachment

查看:81
本文介绍了锚定到文档附件的链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用iText在文档的附件上设置引用或iText锚?

How can I set a reference or an iText anchor to an attachment on my document using iText?

推荐答案

如果您希望锚点打开任何类型的附件:不用担心,ISO-32000-1(如果您不知道,则为PDF参考) )不支持它.如果您希望锚点打开PDF附件,请使用GoToE注释.我引用ISO-32000-1的12.6.4.4节:

If you want an Anchor to open any type of attachment: forget about it, ISO-32000-1 (that's the PDF reference in case you didn't know) doesn't support it. If you want an Anchor to open a PDF attachment: use a GoToE annotation. I quote section 12.6.4.4 of ISO-32000-1:

嵌入式的go-to动作(PDF 1.6)与远程go-to动作相似,但是允许跳转到另一个PDF文件中嵌入的PDF文件或从其中跳出.嵌入式文件可能与文件附件注释或EmbeddedFiles名称树中的条目相关联.

An embedded go-to action (PDF 1.6) is similar to a remote go-to action but allows jumping to or from a PDF file that is embedded in another PDF file. Embedded files may be associated with file attachment annotations or with entries in the EmbeddedFiles name tree.

在iText中,PdfAction类具有不同的gotoEmbedded()方法.阅读iText in Action-Second Edition的p538,以了解如何使用这些方法.

In iText, the PdfAction class has different gotoEmbedded() methods. Read p538 of iText in Action - Second Edition to find out how to use these methods.

这篇关于锚定到文档附件的链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆