Textkit user UnsounderFiddle has prepared a table of 80% of the most common principal parts in Greek in an XLSX format, so you don’t have to worry about that PDF wrangling step.
http://discourse.textkit.com/t/greek-principal-parts-spreadsheet/19470/4
You can either convert the XLSX to CSV, or find a library in your programming language to work with XLSX.