hi,
It seems that you did not attach csv and pdf as a sample to reference. Can you please help to update more? This project looks to be interesting to me, I am familiar with Perl/Bash script, so I think I can handle it with enough information.
Regards,
--T