使用FPDM填充PHP PDF表单会产生错误FilterFlateDecode:无效的流数据 [英] PHP PDF form filling using FPDM gives error FilterFlateDecode: invalid stream data

查看:233
本文介绍了使用FPDM填充PHP PDF表单会产生错误FilterFlateDecode:无效的流数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使PHP脚本使用FPDM自动填充PDF表单,但是当我修复一个错误时,会弹出另一个错误.我使用此工具找到了表单字段,并创建了一个数组,其中每个变量都以字段名称,但出现错误

I am trying to make PHP script to autofill PDF forms using FPDM, but when I fix one bug, another one pops up. I found out my form fields using this tool and made an array where each variable is named after the field name, but I get an error

FilterFlateDecode:无效的流数据.

FilterFlateDecode: invalid stream data.

我要填写的表单具有相同名称的单选字段,例如.

The form that I am trying to fill has radio fields which have the same name, eg.

C R6.  
C R6.  
C R6.  
C R6.

而且我无法将4个数组字段设置为相同的名称.那是问题所在吗?如果是的话,我该如何解决?我应该切换到其他图书馆吗?因为这让我头疼...

And I can't set 4 array fields to have the same name. Is that causing the problem? and if yes, how can I fix it? Should I just switch to a different library? Because this one is giving me a headache...

这是发生错误的FilterFlate文件(第34行) http://pastebin.com/qiEB9BWs

That is the FilterFlate file where the bug occurs (line 34) http://pastebin.com/qiEB9BWs

推荐答案

对于多个数据点,您不能使用相同的名称.这些单选按钮选项应分别属于特定的组,例如:

You can't have the same name for more than one point of data. Each of those radio button options should fall into a specific group of them for example:

你今天过得怎么样?

  • 一般
  • 不适用

问题将是输入字段的标题,每个点将代表该字段的数据.

The question would be the title of the input field, and each point would represent the data of that field.

如果只是一个清单,只需将每个按钮命名为一个单独的单选框.

If its just a checklist, then simply name each button as a separate radio input field.

这篇关于使用FPDM填充PHP PDF表单会产生错误FilterFlateDecode:无效的流数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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