I'm trying to make a simple "service order" system for a client.
First the client fills a form with multimple inputs, then the data is send using ajax to a PHP file that generates a PDF file.
I'm using html2pdf php library https://html2pdf.fr/en/home, and this is the headers' response i get from every ajax request i make:
Cache-Control no-cache, no-store, must-revalidate
connection close
content-description File Transfer
content-disposition attachment; filename="orden-28012018-005747.pdf"
content-transfer-encoding binary
content-type application/pdf
date Sun, 28 Jan 2018 06:57:47 GMT
Expires 0
last-modified Sun, 28 Jan 2018 06:57:47 GMT
Pragma no-cache
server Apache/2.4.23 (Win32) OpenSSL/1.0.2h PHP/5.6.24
Transfer-Encoding chunked
x-powered-by PHP/5.6.24
and i can't get to show the pdf or something, i want to either open it on new tab or force a download of the file.
Can you please help me out?.