3 ms·
As long as the PDF contains text (and isn't just scans of paper), it's usually not TOO hard to select and copy the relevant tables/text, paste into a text edito
by crazygringo 14y ago
As long as the PDF contains text (and isn't just scans of paper), it's usually not TOO hard to select and copy the relevant tables/text, paste into a text editor, and use regex's to transform it into whatever you want (CSV, SQL insert statements, etc.)
Since there's no universal data format (e.g. the data equivalent of PDF), I pretty much assume that whatever format data comes in, I'll have to be doing regex transforms to it in a text editor, in order to import it wherever I want.
So as long as it's copy-pastable as text, PDF doesn't seem appreciably worse than pretty much any other format.
- lttlrck 14y agoWell if it was TOO hard it would be impossible. The point is it should be trivial, and more often than not it isn't.
- BHSPitMonkey 14y agoTables or columns are actually almost always a nightmare to copy and paste from a PDF. I have never had it come out sanely.
- maxerickson 14y agoFor pdfs that are coming from some sort of consistent system, the conversion tools in xpdf work pretty well.
- zdw 14y agoEven better, use `pdftotext` from the Xpdf package to turn it into text, so you skip the manual steps. I do this will all my banking data - dump their PDF's in a folder, a script converts to CSV, then to ledger (cli accounting program) format.