Try to also add a timeout in serving pdf, else we need to go to error page