I think this is a permission issue as PDF download from the Admin page is working quite well. But when I replicate the codes for users, I get a 404 error page.