How to extract field value from PDF form in PHP

你说的曾经没有我的故事 提交于 2019-12-30 03:11:07

问题


We are developing PHP & MySQL based application. We distribute a registration form in PDF format. After filling form, user will upload PDF form to our application to register. We want to extract registration data in PDF form from PHP and save these data to database.

Can someone point me PHP classes for extracting field value from PDF form?


回答1:


An alternative could be using an external program like http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/ and so something like:

$ pdftk file.pdf dump_data_fields

and then process the output. However, this would involve a lot of parsing logic and output processing. Plus, if you cannot install binaries on your server, never mind. :)

It might be just simpler to do as hoppa mentioned.

Edit: This question might be a duplicate of The best pratice to parse PDF forms fields with PHP5 that question has an interesting comment!



来源:https://stackoverflow.com/questions/7419236/how-to-extract-field-value-from-pdf-form-in-php

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!