Jun-02-2021, 10:21 AM
PDF is by nature a strange file structure. There are many forms that a file can take.
some text may actually be just that text, other may be an image. There may or may not be headers.
Same with data, it might be stored in tables (this is what we want), or it might be an image of someone's handwriting.
In my opinion, it's one of the worst methods available for storing data, yet you run across it again and again and must be able, as best as possible, to extract the data into a useful format.
There are many commercial and free packages available for achieving the desired conversion.
each does better on one type of data than others.
pdfminer.six (many other packages are built as wrappers around pdfminer.six), PyPDF2, PyPDF4, which more commonly used from amongst 279 (as of today) PDF packages available here.
I've done a lot of work with U.S. Government, national, state, and local jurisdiction data, and have had to find a different solution for many. Some instances can only be done manually, these are usually the handwritten ones that cannot be interpreted by OCR methods.
Start with the ones (like pdfminer.six and PyPDF2 and/or PyPDF4). There are tutorials for these available. If they don't work, start looking for alternatives.
Good Luck. PDF's are easy, only when the format corporates.
some text may actually be just that text, other may be an image. There may or may not be headers.
Same with data, it might be stored in tables (this is what we want), or it might be an image of someone's handwriting.
In my opinion, it's one of the worst methods available for storing data, yet you run across it again and again and must be able, as best as possible, to extract the data into a useful format.
There are many commercial and free packages available for achieving the desired conversion.
each does better on one type of data than others.
pdfminer.six (many other packages are built as wrappers around pdfminer.six), PyPDF2, PyPDF4, which more commonly used from amongst 279 (as of today) PDF packages available here.
I've done a lot of work with U.S. Government, national, state, and local jurisdiction data, and have had to find a different solution for many. Some instances can only be done manually, these are usually the handwritten ones that cannot be interpreted by OCR methods.
Start with the ones (like pdfminer.six and PyPDF2 and/or PyPDF4). There are tutorials for these available. If they don't work, start looking for alternatives.
Good Luck. PDF's are easy, only when the format corporates.