[Python] How to Convert a PDF Table with Thousands of Rows into JSON in React

Discussão em 'Python' iniciado por Stack, Fevereiro 4, 2025.

  1. Stack

    Stack Membro Participativo

    I am working on a project where I need to convert a PDF containing a large table (thousands of rows) into a JSON Array of object. The PDF has a table with headers that should be used as keys in the JSON object, and the respective cell values should be the values. Each row of the table should be represented as an object in the JSON.

    I have tried using libraries like pdf-parse and pdfjs-dist from npm, but they didn't meet my expectations for extracting the data correctly.

    What is the best approach to extract the table data from the PDF in the format I need? Should I handle this processing on the frontend in React and then send the resulting JSON to the backend (which is built with Python), or should I send the PDF to the backend and handle the conversion there?

    Continue reading...

Compartilhe esta Página