I create a PDF file from raw binary data and works fine, but because of the headers that I define in my PHP file, it prompts the user to either “save” the file or “open with”. Is there a way to save the file on a local server somewhere here http://localhost/pdf ?
Below are the headers I defined on my page
header("Pragma: public"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Cache-Control: public"); header("Content-Description: File Transfer"); header("Content-Type: application/pdf"); header("Content-Disposition: attachment; filename=$filename"); header("Content-Transfer-Encoding: binary");
source share