簡體   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');

您好檢查 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