我有一个 pdf 文档,上面有很多表单域。我需要查看表单字段的名称。我可以使用 Adobe Reader 执行此操作吗?也许第三方工具..?
she*_*ard 40
我很欣赏这个问题有点老,但如果其他人遇到它,PDF Toolkit将允许您使用如下所示的命令非常简单地执行此操作(您想要表单字段的 PDF 称为 docsOfInterest.pdf:
pdftk docOfInterest.pdf dump_data_fields
Run Code Online (Sandbox Code Playgroud)
您可能会找到一个用户友好的应用程序来为您执行此操作,但这就是我通过一点 VBScript 实现它的方法...
从 webSupergoo 下载并安装 ABCpdf,可在此处...
将以下脚本复制到文本文件中,并使用“.vbs”文件扩展名保存。
将 PDF 文件的副本放入与脚本相同的文件夹中,并将其命名为“myForm.pdf”。
双击脚本文件运行。
Set theDoc = CreateObject("ABCpdf8.Doc")
theDoc.Read "myForm.pdf"
theDoc.AddFont "Helvetica-Bold"
theDoc.FontSize=16
theDoc.Rect.Pin=1
Dim theIDs, theList
theIDs = theDoc.GetInfo(theDoc.Root, "Field IDs")
theList = Split(theIDs, ",")
For Each id In theList
theDoc.Page = theDoc.GetInfo(id, "Page")
theDoc.Rect.String = theDoc.GetInfo(id, "Rect")
theDoc.Color.String = "240 240 255"
theDoc.FillRect()
theDoc.Rect.Height = 16
theDoc.Color.String = "220 0 0"
theDoc.AddText(theDoc.GetInfo(id, "Name"))
theDoc.Delete(id)
Next
theDoc.Save "output.pdf"
theDoc.Clear
MsgBox "Finished"
Run Code Online (Sandbox Code Playgroud)
脚本完成后,您应该会发现同一文件夹中出现另一个名为“output.pdf”的 PDF 文档,所有字段名称都覆盖在字段顶部。