dtd58256 2009-09-03 23:32
浏览 37
已采纳

使用PHP获取PDF文件中的字段

How can I find out the name of the fields in a PDF file using PHP?

The only thing I can think of is converting the PDF file to HTML, but that really sounds like overkill.

My end goal is to generate an FDF file (this bit I'm happy with) to populate the fields of a PDF file which I don't have control over, so I don't know what field names I need to use.

  • 写回答

2条回答 默认 最新

  • dqsxsmi3704 2009-09-12 00:30
    关注

    If you are willing to use a command line tool, see

    https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/

    The pdftk command can generate an FDF file from a PDF form file.

    pdftk formfile.pdf generate_fdf

    The form fields are the portion of the output that looks like

    ...
    << /T(f1-1) /V(text of field) >>
    << /T(f1-2) /V(text of another field) >>
    ...
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 微信会员卡接入微信支付商户号收款
  • ¥15 如何获取烟草零售终端数据
  • ¥15 数学建模招标中位数问题
  • ¥15 phython路径名过长报错 不知道什么问题
  • ¥15 深度学习中模型转换该怎么实现
  • ¥15 HLs设计手写数字识别程序编译通不过
  • ¥15 Stata外部命令安装问题求帮助!
  • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 TYPCE母转母,插入认方向
  • ¥15 如何用python向钉钉机器人发送可以放大的图片?