Trembowiecki
Active Member
Hi,
is it possible to open generated (with DOMPDF) PDF in a new browser tab without the need of downloading it at the same time? I've found this:
https://stackoverflow.com/questions/11113562/open-pdf-in-a-new-tab-using-dompdf
...but don't even know if Fabrik allows this modification. And if so - where to find the place to modify/insert this piece of code.
UPDATE
So there's this file (libraries/fabrik/vendor/dompdf/dompdf/src/Adapter/CPDF.php) and I changed these lines:
to:
and
to:
I know it's wrong on so many levels, BUT it works. I forced the function to ommit checking the 'Attachment' option because I have no idea where else Fabrik sets it. If you know where I can spot the proper setting of 'Attachment' option I'll restore te code of CPDF.php right away.
is it possible to open generated (with DOMPDF) PDF in a new browser tab without the need of downloading it at the same time? I've found this:
https://stackoverflow.com/questions/11113562/open-pdf-in-a-new-tab-using-dompdf
...but don't even know if Fabrik allows this modification. And if so - where to find the place to modify/insert this piece of code.
UPDATE
So there's this file (libraries/fabrik/vendor/dompdf/dompdf/src/Adapter/CPDF.php) and I changed these lines:
Code:
if (!isset($options["Attachment"])) $options["Attachment"] = true;
to:
Code:
$options["Attachment"] = false;
and
Code:
$attachment = $options["Attachment"] ? "attachment" : "inline";
to:
Code:
$attachment = "inline";
I know it's wrong on so many levels, BUT it works. I forced the function to ommit checking the 'Attachment' option because I have no idea where else Fabrik sets it. If you know where I can spot the proper setting of 'Attachment' option I'll restore te code of CPDF.php right away.
Last edited: