简体   繁体   English

我使用 TCPDF 如何使用 livewire 进行打印

[英]I use TCPDF how can i print by using livewire

$pdf = new PDF();
$view = View::make('Cards.export_card');
$html_content = $view->render();
$pdf::SetTitle('Patient Lists');
$pdf::SetAuthor('SmartTB');
$pdf::SetFont('helvetica', '', 10);
$pdf::SetFontSize('10px');
$pdf::SetY(-15);
$pdf::SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
$pdf::SetMargins(10, 18, 8);
$pdf::AddPage('L', 'A4');
$pdf::PageNo();
$pdf::writeHTML($html_content, true, false, true, false, '');
$pdf::Output('tb_patient_list_'.time().'.pdf', 'D');

Hi check Livewire file downloads https://laravel-livewire.com/docs/2.x/file-downloads您好检查 Livewire 文件下载https://laravel-livewire.com/docs/2.x/file-downloads

return response()->streamDownload(function () {
    echo 'CSV Contents...';
}, 'export.csv');

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM