I am developing an application with servlets and jsp and database is MYSQL. I want to insert data into mysql database. The data comes from an pdf . I am able to read pdf using itext but the problem is " when I was reading the pdf whole page is reading which is not required. I need only table data which present on pdf. i.e, pdf contains one table which contains data in column and row wise. that data i have to read and insert it into mysql database." Any suggestions or alternative ways to solve this problem . Plase reply me as soon as poosible..
That's going to be hard. PDFs (and PDF APIs) are not really designed to make this kind of selective access possible. That said, check out the http://java.net/projects/pdf-renderer/ library; it can display PDFs, so obviously it has code in it somewhere that can handle tables.
I have gone through your link but I did n't get anything. give me any idea to achieve this...
Thanks and regards,
Joined: Sep 21, 2011
You can download the source code of that library. As I said, it can display PDFs (including tables), so it must have code somewhere to handle tables in PDFs. Where that is, I have no idea. You will likely have to spend a fair amount of time understanding the source code before it becomes obvious what needs to be done.
If time is of the essence you may wish to look into commercial APIs instead (like Aspose).