PHP mPDF复选框以PDF格式检查

Sha*_*rif 5 php pdf checkbox mpdf

免责声明: 对mPDF一无所知:(

我正在使用mPDF创建一个PDF文件,我已成功打印表格.我在检查复选框时遇到了一些问题.复选框不会在PDF视图中检查,但如果我在HTML中查看相同的代码,则会检查它.例如

$output .= '<td width="50%" colspan="2">';
  $output .= '<strong>Instructed Another Solicito?</strong> ';
  $output .= 'Yes <input type="checkbox" checked /> ';
  $output .= 'No &nbsp; <input type="checkbox" />';
$output .= '</td>';
Run Code Online (Sandbox Code Playgroud)

如果我以HTML echo $output;格式查看它们会检查是,但只要我输出pdf文件即$mpdf->WriteHTML($html); $mpdf->Output();显示为未选中.

我需要做些什么来检查我的复选框是否还有其他方法可以解决这个问题

任何的想法?

Amj*_*jad 10

你应该用 checked="checked"

  • 我做了同样的事情,但它显示的是十字图像而不是右刻度图像 (2认同)