4 ms·
I'm parsing PDFs and extracting tabular data - I am using this library https://github.com/coolwanglu/pdf2htmlEX https://github.com/coolwanglu/pdf2htmlEX to conv
by fareesh 6y ago
I'm parsing PDFs and extracting tabular data - I am using this library https://github.com/coolwanglu/pdf2htmlEX https://github.com/coolwanglu/pdf2htmlEX to convert the PDF into HTML and then parsing thereafter. It works reasonably well for my use-case but there are all kinds of hacks that I've had to put in place. The system is about 5-6 years old and has been running since.
The use-case is basically one where there is a tabular PDF uploaded every week and the script parses it to extract the data. Thereafter a human interacts with the data. In such a scenario, every ~100 parses it fails and I'll have to patch the parser.
Sometimes text gets split up, but as long as the parent DOM node is consistent I can pull the text of the entire node and it seems to work fine.
- funerr 6y agoDid you publish your fixes so this could help others too? it seems like this repo is unmaintained atm.
- fareesh 6y agoThey are very specific changes for my use-cases unfortunately
- teodorivanov624 6y agoI would encourage you to look into the camelot python module - https://github.com/camelot-dev/camelot https://github.com/camelot-dev/camelot. I've worked with this for almost a year and it does work for most conventional tables and pdfs.