After your pdf file is done, you know the path and all details for the pdf. Return an html or an json object back to your page, and create a new html button that will link to the pdf file.
Your returned data will contain all needed details about the pdf. Name, path, etc...