Export to PDF Functionality

Add export to PDF functionality and fix bug in directory edit.