• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

reading pdf's table problem

 
Ranch Hand
Posts: 57
Netbeans IDE MySQL Database Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ranchers,

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..

Thanks and regards,

mike...
 
Saloon Keeper
Posts: 5564
143
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
mike mimmis
Ranch Hand
Posts: 57
Netbeans IDE MySQL Database Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for reply,

I have gone through your link but I did n't get anything. give me any idea to achieve this...

Thanks and regards,

mike...
 
Tim Moores
Saloon Keeper
Posts: 5564
143
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!