PHP:从PDF提取fdf字段作为数组 [英] PHP: Extract fdf fields as an array from a PDF
本文介绍了PHP:从PDF提取fdf字段作为数组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想从可填充的pdf中提取可用字段作为数组.
i want to extract the available fields as an array from a fillable pdf.
一个数组,如:array('firstname','secondname','address');
如果这些字段已填写,我不需要这些值.
i do not need the values for those fields, if they are filled.
使用PHP最简单的方法是什么?
what is easiest way to do that using PHP?
推荐答案
在"fdf_next_field_name"的在线文档下,给出了以下示例,您可以对其进行修改以将字段名称存储到数组中
under online documentation for "fdf_next_field_name" the following example is given that you can modify to store the field names into an array
<?php
$fdf = fdf_open($HTTP_FDF_DATA);
for ($field = fdf_next_field_name($fdf); $field != ""; $field = fdf_next_field_name($fdf, $field)) {
echo "field: $field\n";
}
?>
这篇关于PHP:从PDF提取fdf字段作为数组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文