Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to extract field value from PDF form in PHP [closed]

Tags:

forms

php

class

pdf

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?

like image 282
Thein Hla Maw Avatar asked Sep 14 '11 15:09

Thein Hla Maw


1 Answers

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!

like image 82
Favio Avatar answered Nov 15 '22 19:11

Favio