Wkhtmltopdf throughs未被捕获的SSL错误被忽略

时间:2018-03-19 05:26:59

标签: php html codeigniter wkhtmltopdf

我正在尝试使用wkhtmltopdf将我的数据下载到pdf以获取以下错误。

任何帮助都会非常感激。

$html = $this->load->view('report/view_course_summary_pdf', $data, true);    
$pdfFilePath = "Course_Summary_Report.pdf";
$options['path'] = $myPath;
$options['orientation'] = 'Landscape';
$options['commandOptions'] = 
            array(
                'useExec' => true, // Can help if generation fails without a useful error message
                'procEnv' => array(
                    // Check the output of 'locale' on your system to find supported languages
                    'LANG' => "'" . $this->session->userdata('lang_code') . "_US.utf-8" . "'",
                )
            );
            $this->load->library('wkhtmltopdf', $options);
            $this->wkhtmltopdf->setTitle($this->common_lang->get_lang_token('course_summary_report'));
            $this->wkhtmltopdf->setOptions(['ignoreWarnings' => true]);
            $this->wkhtmltopdf->setHtml($html); // $html can be a url or html content.
            $this->wkhtmltopdf->output(Wkhtmltopdf::MODE_DOWNLOAD, $pdfFilePath);

这是我的PHP codeigniter文件中发送错误的行,如果有帮助的话:

{{1}}

许多人谈到了与使用WKPDF和SSL相关的类似问题,但我不认为这会导致我的问题,因为它说SSL错误被忽略了......帮助将非常感激。每当我尝试这样做时,我的HTML都会被下载,但是使用上面的Codeginter代码就会损坏格式。

0 个答案:

没有答案