Scenario I want to make an existing PHP script dynamically generating a PPTX (Microsoft PowerPoint File) (Risk Mitigation Event Summary) accessible via an API call to specifically cause AngularJS front end to download the file. So far my script contains a function called generatePresentation (actual name below). It works opening the script in a browser and produces dynamically generated file