Fixed download of PDF in frontend