...

View Full Version : Extract Row Data from file and saving in MYSQL tables using PHP



saeed
11-21-2011, 06:24 AM
Hello everyone,

I have a pdf file in which there are about 1700 pages each page contains about 7 records and each record contains the following data:

company_name,
address_line_1,
address_line_2,
telephone,
fax,
email,
name,
exporter,
importer,
manufacturer,
services.

now in some records exporter, importer, manufacturer, services data isn't available and some does have address_line_3 as well.

Sequence of the data is exactly the same mentioned above.

I have a little idea that using PHP file can viewed and displayed it as results over the screen. I want to save it in MYSQL Database.

Company name name starts M/s. in the beginning
similarly "Tel:" for telephone, "Fax:" for fax, and so on.

I will be very grateful if someone can give me an idea how this can be done.

Thank you very much.

mlseim
11-21-2011, 02:46 PM
You can only do this if you have your own server.
It requires XPDF installed for your server.
http://www.foolabs.com/xpdf/about.html

Once installed, you can read text from a PDF file.

If you are using a shared webhost for your website, it cannot be done ... as far as I know.

sunfighter
11-21-2011, 03:30 PM
http://www.convertpdftotext.net/ is free software to convert pdf files into text files. Once done, it should not be a problem to open file and read it in php one line at a time, categorize the line, and place it into the correct SQL column.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum