send the request to generate the pdf when the user presses save