3 ms·
On the field of PDF parsing, I think the most interesting project I encountered is pdfquery[1], where the PDF is parsed as a XML tree and you can use XPath to q
by chazeon 4y ago
On the field of PDF parsing, I think the most interesting project I encountered is pdfquery[1], where the PDF is parsed as a XML tree and you can use XPath to query it. You might encounter rough edges when put it into production work but the idea is like “how come i never thought of this” because PDF has some tree like structure and should be a straightforward solution.
[1]: https://github.com/jcushman/pdfquery https://github.com/jcushman/pdfquery
- mythrwy 4y agoThere is a command line utility (pdf2text) that will also parse the pdf to an XML tree and you can query with XPaths. I found it works well. https://pdfminersix.readthedocs.io/en/latest/reference/commandline.html https://pdfminersix.readthedocs.io/en/latest/reference/comma...
- mdaniel 4y agoThat makes sense, as "pdfquery" uses pdfminer.six as a dep: https://github.com/jcushman/pdfquery/blob/master/requirements_py3.txt#L4 https://github.com/jcushman/pdfquery/blob/master/requirement...
- deleted 4y ago[deleted]
- contentboot 4y agoThis is great, thank you for posting it.