Adding pdf functionality