How to extract data table from PDF file and convert it to JSON?

Viewed 47

In order to develop a java API to extract table data from a PDF file and convert it to JSON in order to use this data for specific processing. I tried to use the PDFBox and Tabula libraries together to convert the data tables from PDF to xml(xlst) then from xml(xlst) to JSON, it went well for a data table with simple columns and rows but with a complex format data table I couldn't do it, I got a result with mixed data.

My question is what is the best and easiest way to extract table data from a PDF file and convert it to JSON using Java? Below is an image of the complex format data table in question that I want to convert to JSON.

Thank you very much in advance, I will be very grateful for your help.

Example of the complex data table format in the PDF file

0 Answers
Related