Export pdf functionality
Fixes in pdf functionality