如何隐藏 PDF 文件中的文本? [英] How to hide text in an PDF file?

查看:116
本文介绍了如何隐藏 PDF 文件中的文本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在不可见的 pdf 文档中添加文本?​​

How can I add text to a pdf document, which is not visible?

文档操作应该在java中完成.用例是在文档签名和存档之前向文档添加更多元数据(以专有格式,大约 40kb).

The document manipulation should be done in java. The usecase is to add further metadata to a document (in a proprietary format, about 40kb), before the document is signed and archived.

我试过了:

  • 大小为 0,0 的注释字段
  • .txt 文件附件

但是,这会惹恼 PDF 的读者,因为他们看到了不同之处(评论/附件栏).

but, this annoys readers of the PDF, because they see a difference (comment / attachment bar).

是否有注释对象或语法来注释 PDF 文档中的行?

Is there a comment object or a syntax to comment out lines in a PDF document?

我试过在 PDF 对象之间添加文本.这有效,问题是:acrobat reader 在关闭窗口时要求重新保存文件.

I've tried adding text between PDF objects. This works, the problem is: acrobat reader asks to resave the file when closing window.

在 %EOF 之后添加文本不是解决方案,因为签名不适用于元数据,这是一个必需的功能.

Adding the text after %EOF is not a solution, because signing is not applied to the metadata, which is a needed feature.

推荐答案

向 PDF 添加元数据的正确方法是通过 XMP.它允许您添加任意元数据并允许在同一个 PDF 文件中定义元数据类型(如果您正在存档,您确实应该这样做,这也是 PDF/A 等存档标准的要求).

The proper way to add metadata to a PDF would be through XMP. It allows you to add arbitrary metadata and allows defining the metadata types inside of the same PDF file (which you really should do if you're archiving and which is a requirement in archival standards such as PDF/A).

不懂 PDF 格式的读者可以使用简单的文本扫描算法提取 XMP 数据,但同时它会保存在文档内部,因此会受到您应用的数字签名的保护.

XMP data can be extracted by readers who don't understand the PDF format using a simple text scanning algorithm yet at the same time it will be inside of the document so will be protected by the digital signature you apply.

您可以在此处阅读更多相关信息:http://www.adobe.com/products/xmp/

You can read more about it here: http://www.adobe.com/products/xmp/

这篇关于如何隐藏 PDF 文件中的文本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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