0
Good morning guys. I was wondering how do I set the download destination location of the dompdf function.
//Para realizar o download somente alterar para true
$dompdf->stream("documento_para_download.pdf", array("Attachment" => false));
I’m not sure if there is any structure that goes on this line q is next to the context of the pdf that is available here:
//referenciar o DomPDF com namespace
use Dompdf\Dompdf;
// include autoloader
require_once("dompdf/autoload.inc.php");
//Criando a Instancia
$dompdf = new DOMPDF();
// Carrega seu HTML
$dompdf->load_html('');
/Renderizar o html
$dompdf->render();
//Exibibir a página
//Para realizar o download somente alterar para true
$dompdf->stream(documento_para_download.pdf", array("Attachment" => false));
And then comes the file information. I just need to tell him where to save
You have no way to tell the client where it will force the download by stream, will always save where the user says to save, you can only set the location on your server, client-side no.
– AnthraxisBR
if I am on my server I can say $dompdf->stream(folder/doc/document_para_download.pdf", array("Attachment" =>true));
– Wesley Float