I'm looking to enhance the reporting system on my website by sending an AJAX request with a progress bar. The server will collect the necessary data, convert it into HTML, and then send it back to me. Upon successful completion of the AJAX request, I would like to close the progress bar and open the response data in a new browser tab. Is this possible? If so, could you please provide some advice on how to achieve this? Specifically, I am interested in the final step where the data is already collected and stored in a JavaScript variable, and I just need to display it in a new tab.
One important detail to note is that the report output should be in PDF format, not HTML.