Dompdf does not load graphic from my html page

Asked

Viewed 220 times

2

Good afternoon guys,

I have a problem where my pdf does not load my html...

Controller:

function pdf()
    {
      $this->load->library('pdf');
      $data = $this->input->post('input');



        $file_name = 'Dortech.pdf';

        $html  = $data;

        $pdf = new Pdf();
        $pdf->load_html($html);
        $pdf->render();
        $pdf->stream($file_name, array("Attachment" => false));

    }

however when I give an echo on my variable $data it appears the html I requested.

1 answer

1

I used the function getImageURI(), because domPDf does not support the extension of graphics... So I transformed into image and managed to bring to PDF.

  • Hello Diego, how did you do? I need an example.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.