使用.NET提取PDF文档中标记为要编辑的文本 [英] Extracting text marked for redaction in a PDF document using .NET

查看:126
本文介绍了使用.NET提取PDF文档中标记为要编辑的文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在研究PDF acrobat附加产品,其中一项要求是提取给定PDF文档中标记为要编辑的文本。

I am working on a PDF acrobat add-on product and one of the requirements is to extract the text marked for redaction in a given PDF document.

假设您知道什么是修订(如果您不 http:// acrobatusers.com/tutorials/redacting-pdf-files-survey-tools ),请建议我如何找到在任何PDF中已标记为要编辑的文本的坐标,然后将其提取出来文本。

Assuming you know what is "redaction" ( Please read this if you don't http://acrobatusers.com/tutorials/redacting-pdf-files-survey-tools ), please suggest how can I discover the co-ordinates for the text which has been "marked" for redaction in any PDF and then extract the exact text.

如果您认为可以带给我正确答案,请询问更多详细信息。
我曾尝试使用iTextSharp和Aspose.PDF库对它们进行相同操作,但没有太大的成功。

Please ask for more details if you believe you can lead me to the correct answers. I have tried using iTextSharp and Aspose.PDF libraries for the same without much success.

推荐答案

标记文本时为了使用Acrobat进行修订,它会创建修订注释。编校注释的/ Subtype键设置为/ Redact。编辑区域由注释字典中的/ QuadPoints键定义。我不知道iTextSharp或Aspose是否支持修订注释。使用iTextSharp,您可以使用COS API检索原始PDF对象并检查所需的对象。

When you mark text for redaction with Acrobat, it creates redaction annotations. The redaction annotations have the /Subtype key set to /Redact. The redaction area is defined by the /QuadPoints key in annotation dictionary. I do not know if iTextSharp or Aspose support redaction annotations. With iTextSharp you can use the COS API to retrieve the raw PDF objects and inspect the objects you need.

这篇关于使用.NET提取PDF文档中标记为要编辑的文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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