查找 PDF 文档中可输入表单字段的字段名称?

发布于 2024-09-10 15:41:12 字数 363 浏览 4 评论 0原文

查找 PDF 文档中可输入表单字段的字段名称?我有一个可编辑的 PDF 表单,我正在尝试使用 python 自动将表单字段输入到其中。

为了做到这一点,我必须知道要输入的 FDF 数据中表单字段的“名称”。

请参阅背景问题:如何自动-在 Django/Python 中填充 PDF 表单?

我不需要以编程方式从 PDF 中查找名称,只需要知道它们是什么,如果这在 Preview/Adobe/etc 中可行的话。 PDF阅读器/编辑器就足够了。

Find the field names of inputtable form fields in a PDF document? I have an editable PDF form that I'm trying to automate the entry of form fields into using python.

In order to do this I must know the "names" of the form fields in the FDF data to input.

See question for background: How can I auto-populate a PDF form in Django/Python?

I don't need to find the names programaticaly from the PDF necessarily, just need to know what they are so if this is possible in Preview/Adobe/etc. PDF readers/editors that is sufficient.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

请爱~陌生人 2024-09-17 15:41:12

之前问过。查看 pdftk 的 dump_data_fields

Previously asked. Have a look at pdftk's dump_data_fields.

遗弃M 2024-09-17 15:41:12

我最近尝试以编程方式填写 PDF 表单,但我不知道可填写的字段名称。

我发现 https://www.pdffiller.com/ 如果您进入,它可以让您查看字段名称“编辑 PDF 模式”(打开面板的小型右侧栏)。

然后我意外地发现,如果您在 Acrobat Reader(免费版)中打开 PDF 并将鼠标光标悬停在字段上,字段名称会显示在一个小提示弹出窗口中。您可以使用此字段名称在代码中查找并填充该字段。

输入图片此处描述

I was recently trying to programatically fill in a PDF form but I did not know the fillable field names.

I found https://www.pdffiller.com/ which lets you view the field name if you go into the "Edit PDF mode" (tiny right-side bar that opens a panel).

Then I accidentally found that if you open the PDF in Acrobat Reader (free version) and hover your mouse cursor over the field the field name is shown in a little hint popup. You can use this field name to find and fill the field in code.

enter image description here

去了角落 2024-09-17 15:41:12

我还需要验证用于复选框的名称和选项,以便我可以通过编程方式填充 SQLite 数据库中的数据。

我尝试了几种 PDF 工具,最终使用了官方的 Adob​​e Acrobat Pro 应用程序。我获得了 7 天免费试用,并用它来获取我需要的所有名称,然后取消了它。

当您打开可填写的 PDF 表单时,您需要从最右侧的工具栏中选择“更多工具”选项,然后选择“准备表单”。我将其添加到工具栏,以便更容易使用。当您这样做时,您将看到已创建的所有字段。

然后在字段名称列表上方的更多工具中选择显示字段属性。

然后,当您单击任何字段时,您会看到弹出窗口,其中显示所有详细信息,不仅仅是名称和类型,还有默认值等。

我正在 Mac OS X Catalina 10.15.7 上运行
我使用 Adob​​e Acrobat Pro DC 版本 2022.001.20112

I also needed to verify both the names and the options used for checkboxes so I could programmatically fill in the data from my SQLite database.

I tried several PDF tools and ended up using the official Adobe Acrobat Pro application. I got the 7 day free trial and used it to get all the names I needed and then cancelled it.

When you open a fillable PDF form you need to select the More Tools option from the far right toolbar, then select Prepare Form. I added it to the toolbar so it was easier to use. When you do that you will see all the fields that have been created.

Then in the More Tools above the list of field names select Show Field Properties.

Then when you click on any of the fields you get the pop-up that shows all the details, not just the name and type but defaults and more.

I am running on Mac OS X Catalina 10.15.7
I used Adobe Acrobat Pro DC Version 2022.001.20112

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文