On 2025-02-20 14:08, Richard Owlett wrote:
I wish to extract CSV formatted data from a PDF document. [1] Page ES-7 has a weekly grocery list for males grouped by age. I need only the first and last columns. Can someone point me in a suitable direction? TIA [1] https://www.fns.usda.gov/cnpp/thrifty-food-plan-2006 Table ES-1. Thrifty Food Plan market baskets, quantities of food purchased for a week, by age-gender group, 2006
If copy/paste the table into a text editor the values look to be all over the place.
Perhaps pdfminer or something does a better job.Once in some sort of order you could get the entries into an array with Text::CSV, extract what you want and save to a file.