406 Not Acceptable An appropriate representation of the requested resource could not be found on this server

Viewed 19

I am trying to use dompdf here to convert html to PDF, initial it works perfectly but I tried checking the link now and I got 406 Not Acceptable error. I am not sure where I got it wrong but any help will be appreciated, find below the code:

namespace Dompdf;
require_once 'dompdf/autoload.inc.php';

    $options = new Options();
$options->set('isRemoteEnabled', true);
$dompdf = new Dompdf($options);
//$dompdf = new Dompdf(); 
$dompdf->loadHtml('Hello world');
$dompdf->setPaper('A4', 'portrait');
$dompdf->render();
exit(0);

And I'm using the library from this link https://github.com/nFnK/dompdf

0 Answers
Related