WriteHtml无法在mpdf中正常工作在php mvc中发送带附件的邮件?

时间:2016-08-08 11:54:07

标签: php ajax model-view-controller mpdf

我试图从mpdf库中的html制作pdf并发送带有pdf文件附件的邮件。但我不能。 WriteHtml无法回复。

WriteHtml回复:

Headers no-store no-chach type:html/text
$mpdf = $StockModel->getPdfObj();
$mpdf->allow_charset_conversion = true;
$mpdf->charset_in = 'ISO-8859-2';       
//$mpdf->allow_html_optional_endtags = true;
//$mpdf->restoreBlockPageBreaks = true; 
$mpdf->useOnlyCoreFonts = true;   
//$mpdf->SetProtection(array('print')); 
$mpdf->SetHeader('|'.$stype.'|Date '.date("d-M-Y").' ');
$mpdf->SetFooter('www.angellogistic.in');
$mpdf->defaultheaderfontsize=7;
$mpdf->defaultheaderfontstyle='B';
$mpdf->defaultheaderline=0;
$mpdf->defaultfooterfontsize=7;
$mpdf->defaultfooterfontstyle='BI';
$mpdf->defaultfooterline=0;
$mpdf->SetTitle("angel logistic");
$mpdf->SetAuthor("angel logistic");
$mpdf->SetWatermarkText("angel logistic");
$mpdf->showWatermarkText = true;
$mpdf->watermark_font = 'DejaVuSansCondensed';
$mpdf->watermarkTextAlpha = 0.1;
$mpdf->SetDisplayMode('fullpage');
$mpdf->WriteHTML(utf8_encode($html));

在html中分配html和内联css代码和标签。

0 个答案:

没有答案