php - TCPDF: Severe formatting bug with writeHtml -
look @ code:
$pdf->ln(4); $pdf->setfont('helvetica', '', 14); $pdf->setfillcolor(200, 220, 255); $pdf->cell(180, 6, 'education', 0, 1, '', 1); $pdf->ln(4); $pdf->setfont('helvetica', '', 10); $html = ' degree ...................... <strong>' . $education->degree_title . '</strong> <br/> graduation date ............. ' . date('m-d-y', strtotime($education->award_date)) . ' <br/> attendance .................. ' . date('m-d-y', strtotime($education->school_start_date)) . ' - ' . date('m-d-y', strtotime($education->school_end_date)) . ' <br/>'; $pdf->writehtml($html, true, false, true, false, '');
because it's running when setting is:
$pdf->setcellmargins(30, 0, 0, 0);
the end result is:
as can see, html <strong>
causes part of html bolded, influenced "30" value in setcellmargins. if don't use <strong>
or other html element matter formatting fine.
is there way around bug? don't want stop using left cell margin, , don't want discontinue using bold in pdf.