Error on Creating PDF - ERR_INVALID_RESPONSE

milesreid

New Member
Hi
I am having an error in creating a PDF using DomPDF from my details view.

I have tested DOMPDF in a simple script (see code below) and it works as intended, but I cannot generate the pdf within

PHP:
    require 'vendor/autoload.php' ;
    use Dompdf\Dompdf;
    $dompdf = new Dompdf();
    $dompdf->loadHtml('<h1 style="color:#f00">Test PDF Render</h1>');
    $dompdf->setPaper('A4', 'landscape');
    $dompdf->render();
    $dompdf->stream("Generate 3", array('Attachment'=>0));
This script being executed from /libraries/fabrik/vendor/vendor

In my J3 application I can run mysite.com/my-menuitem/details/7/16 - this executes as intended, but the following throws an error:
mysite.com/my-menuitem/details/7/16?format=pdf
Chrome reports ERR_INVALID_RESPONSE

This is probably just a case of getting paths correct, but I cannot see where the adjustments need to be made. I did run composer as directed on github,
Thanks
Miles
 
This is Fabrik 3 forum, /libraries/fabrik/vendor/vendor sounds like Fabrik 4.
What do you mean with script?
Fabrik PDF is created by enabling the PDF button in form settings.
I did run composer as directed on github
To do what?
 
Hi
I'm on Joomla 3.10 and PHP 7.4
Fabrik is 3.10
I downloaded the dompdf library and was running composer as it documents in https://github.com/dompdf/dompdf . my understanding was that it was necessary to require the dompdf in the default.php of my details view within components/com_fabrik/views/details/tmpl
I could not get this to work!
 
Many thanks for your help, troester - and particularly for your patience.
Everything is working fine now. I needed another pair of eyes to get me back to basics!
Miles
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top