convertion of pdf to mysql

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
divakar_php
Forum Newbie
Posts: 1
Joined: Fri Jun 05, 2009 8:28 am

convertion of pdf to mysql

Post by divakar_php »

Hi ALL,

I am new to this forum.

I am working on an e-commerce application, where i need to insert categories into respective category table in MySql DB.
I have a file with .pdf extension where the categories were present, and i need to insert those categories into mysql DB.

Is there any code available in php to convert directly that data to mysql?
Other-wise any tool which convert data from .pdf to mysql?

Please reply to my query if there exists any alternative....

Thanx in advance.... :roll: :roll: :roll:
User avatar
mikemike
Forum Contributor
Posts: 355
Joined: Sun May 24, 2009 5:37 pm
Location: Chester, UK

Re: convertion of pdf to mysql

Post by mikemike »

I'm 99.9% sure there is no tool that will convert directly from PDF to MySQL as PDF's aren't set format documents, where as MySQL tables are.

You may be able to use some sort of PHP library to grab the contents of the PDF (assuming it's even editable as a lot of PDFs aren't, it depends on the compile settings at time of saving) and parse them into something readable by MySQL - that's either an SQL statement or a CSV.

I know 'fpdf' (Google it) can create PDF's very well, but I'm not sure about reading them. GhostScript is a command-line tool for UNIX systems that is also hand for PDF's, again I'm not sure if it can read them though
User avatar
juma929
Forum Commoner
Posts: 72
Joined: Wed Jun 17, 2009 9:41 am

Re: convertion of pdf to mysql

Post by juma929 »

Hello,

I use FPDF quite extensively but have never seen an ability to "read" PDF files. I'm willing to bet there is something available out there that can read PDF's but if you cant find anything let me know because that would be a nice little project if it doesnt exist! :P

Thanks 8O
Post Reply