Re:A Python Library to extract tabular data from PDFs
by vortex_ape on Friday October 12, 2018 @04:30AM
(#18200070)
Hi berti! I wrote the library and the blog post. Can you point me to some PDFs which have these register maps?
[ Parent
| on HN ]
Re:A Python Library to extract tabular data from PDFs
by berti on Friday October 12, 2018 @04:41AM
(#18200110)
Try these:
Page 233
http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-8351-M...
Page 45 https://ae-bst.resource.bosch.com/media/_tech/media/datashee...
Is the library able to handle cells that span multiple columns?
Re:A Python Library to extract tabular data from PDFs
by vortex_ape on Friday October 12, 2018 @05:16AM
(#18200243)
I assumed that you're talking about page 33 in the first PDF, since it has only 225 pages. I extracted Figure 6-23 from it and the table on page 45 in the second PDF. Here's a gist: https://gist.github.com/vinayak-mehta/cf30a5560f1b8ab4c0b25e...
Yes, Camelot takes care of cells spanning multiple columns! You can check out the Advanced Usage section for explanation on the keyword arguments I used in the gist! https://camelot-py.readthedocs.io/en/master/user/advanced.ht...
Re:A Python Library to extract tabular data from PDFs
by vortex_ape on Friday October 12, 2018 @05:24AM
(#18200272)
Note: I had to decrypt the second PDF using qpdf since the library I'm using to split a PDF into pages (PyPDF2) doesn't support the encryption type of that PDF.
Did this: qpdf --decrypt input.pdf output.pdf
Re:A Python Library to extract tabular data from PDFs
by berti on Friday October 12, 2018 @07:26PM
(#18205419)
Sorry! Page 203 in the first PDF has a full table if registers, and that bits in them. Thanks very much for the library, and even more for taking the time to create that notebook. The captured data looks excellent. I'll hax some code to translate this data to a header file suitable for writing a driver.