added pdf handling to gridify close #9