如何在dompdf中包含CSS? setBasePath不起作用

时间:2018-12-29 22:16:59

标签: codeigniter-3 dompdf

我在代码中使用了setBasePath,但是css dan image没有出现

https://imgur.com/nlY64iL https://imgur.com/TJrb1bF

public function load_view($view, $data = array()){
    $html = $this->ci()->load->view($view, $data, TRUE);
    $this->loadHtml($html);
      $this->setBasePath('../assets/images/oneimage.jpg');        
     $this->setBasePath('../assets/css/bootstrap.min.css');

    // Render the PDF
    $this->render();
        // Output the generated PDF to Browser
    $this->stream($this->filename, array("Attachment" => false));
}

0 个答案:

没有答案