我可以使用Python在PDF文档中填写表单字段吗?
我有一个表单字段填充的PDF,我想使用Python脚本填充,我无法使用JavaScript,这似乎是首选的解决方案。这是可以通过Python脚本来完成的吗?捕获是,我无法安装任何库,例如pypdf2,fillpdf或fdfgen,例如此答案。这仍然可以吗?我可以自制类似的解决方案吗?
可以将字段仔细检查,并假设字段的alt文本是其名称,我也有这些字段,尽管似乎至少有1个字段未命名。
理想情况下,我想用可以通过编程方式生成的变量填充多个特定字段,然后将PDF保存为新文件。
I have a form field fillable PDF that I'd like to fill using a python script, I can't use JavaScript which seems to be the preferred solution. Is this something that can be done through a python script? The catch is that I can't install any libraries like PyPDF2, fillpdf, or fdfgen like in this answer. Is this still possible? Can I homebrew a similar solution?
The fields can be tabbed through and assuming the alt text of a field is its name, I have those as well, though at least 1 field appears to be unnamed.
Ideally I'd like to fill multiple specific fields with variables that I can programmatically generate and then save the PDF as a new file.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论