Attach PDF function not working.