added PDF export function