从mPDF文档中:
表内的块级标记(DIV,P等)将被忽略,包括任何CSS样式-内联CSS或样式表类,id等
修改mPDF以接受表中的块级元素和样式需要什么?
鉴于此表,mPDF允许对表中的p,ul和li元素进行样式设置需要什么?
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><body style="color: #05314d; font-family: arial,Helvetica,sans-serif; font-size: 16px;">
<div class="example--pdf example-depth-1" style="margin-bottom: .5rem;">
<div class="example--body " style="padding-left: 0%; font-size: 15px;">
<div class="requirement" style="margin-bottom: .5rem;">
<p class="head--toggle section--heading" style="margin-top: 10px; margin-bottom: 10px; font-family: arial,Helvetica,sans-serif; font-size: 1rem; font-weight: 700; margin: .5rem 0 0; padding-bottom: .4rem; padding-left: 1.75rem; color: #b34718; background-image: url('/images/section-checkbox.png'); background-repeat: no-repeat; background-position-x: left; background-position-y: 30px;"><strong style="font-weight: 700;">Section type</strong></p>
<table style="border-collapse: collapse; border-spacing: 0; page-break-inside: auto; font-size: 15px; line-height: 1.4; width: 100%; margin-bottom: .625rem;">
<thead style="border: 1px solid #000; text-transform: uppercase;"><tr style="border: 1px solid #000; border-color: #000!important;">
<th colspan="2" style="font-size: 15px; border-color: #000!important; background-color: #b34718; color: #fff; padding: .375rem; vertical-align: top; border: 1px solid #000; text-align: center;">Section Header</th>
</tr></thead>
<tbody>
<tr style="border: 1px solid #000; border-color: #000!important;">
<td style="font-size: 15px; vertical-align: top; border: 1px solid #000; padding: .375rem; border-color: #000000; width: 40%;">
<p style="margin-top: 10px; margin-bottom: 10px; margin: 0;">Lorem Ipsum</p>
</td>
<td style="font-size: 15px; vertical-align: top; border: 1px solid #000; padding: .375rem; border-color: #000000; width: 59%;">
<ul style="padding-left: 1.125rem;">
<li style="padding-bottom: 0.5rem; margin-bottom: .375rem; list-style-image: url('/images/list-items/square-section.png');">Consetetur sadipscing elitr
<ul style="padding-top: .625rem; padding-left: 1.125rem;">
<li style="padding-bottom: 0.5rem; margin-bottom: .375rem; list-style-image: url('/images/list-items/circle-section.png');">At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet, or</li>
<li style="padding-bottom: 0.5rem; margin-bottom: .375rem; list-style-image: url('/images/list-items/circle-section.png');">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.</li>
</ul>
</li>
<li style="padding-bottom: 0.5rem; margin-bottom: .375rem; list-style-image: url('/images/list-items/square-section.png');">Stet clita kasd gubergren.</li>
</ul>
<p style="margin-top: 10px; margin-bottom: 10px; margin: 0;">Lorem ipsum dolor sit amet, consetetur sadipscing elitr</p>
</td>
</tr>
<tr style="border: 1px solid #000; border-color: #000!important;">
<td style="font-size: 15px; border-color: #000!important; vertical-align: top; border: 1px solid #000; padding: .375rem; width: 40%;">Duis autem vel eum iriure dolor</td>
<td style="font-size: 15px; border-color: #000!important; vertical-align: top; border: 1px solid #000; padding: .375rem; width: 59%;">
<p style="margin-top: 10px; margin-bottom: 10px; margin: 0;">Labore et dolore magna aliquyam erat</p>
<p style="margin-top: 10px; margin-bottom: 10px; margin: 0;"></p>
<ul style="padding-left: 1.125rem;">
<li style="padding-bottom: 0.5rem; margin-bottom: .375rem; list-style-image: url('/images/list-items/square-section.png');">At vero eos et accusam et justo duo dolores et ea rebum, or</li>
<li style="padding-bottom: 0.5rem; margin-bottom: .375rem; list-style-image: url('/images/list-items/square-section.png');">Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</li>
</ul>
</td>
</tr>
<tr style="border: 1px solid #000; border-color: #000!important;">
<td style="font-size: 15px; border-color: #000!important; vertical-align: top; border: 1px solid #000; padding: .375rem; width: 40%;">Vel illum dolore eu feugiat nulla</td>
<td style="font-size: 15px; border-color: #000!important; vertical-align: top; border: 1px solid #000; padding: .375rem; width: 59%;">
<p style="margin-top: 10px; margin-bottom: 10px; margin: 0;">Any Hendrerit in vulputate velit esse molestie consequat where:</p>
<p style="margin-top: 10px; margin-bottom: 10px; margin: 0;"></p>
<ul style="padding-left: 1.125rem;">
<li style="padding-bottom: 0.5rem; margin-bottom: .375rem; list-style-image: url('/images/list-items/square-section.png');">dolore magna
<ul style="padding-top: .625rem; padding-left: 1.125rem;">
<li style="padding-bottom: 0.5rem; margin-bottom: .375rem; list-style-image: url('/images/list-items/circle-section.png');">At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet, or</li>
<li style="padding-bottom: 0.5rem; margin-bottom: .375rem; list-style-image: url('/images/list-items/circle-section.png');">Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi</li>
</ul>
</li>
<li style="padding-bottom: 0.5rem; margin-bottom: .375rem; list-style-image: url('/images/list-items/square-section.png');">Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam
<ul style="padding-top: .625rem; padding-left: 1.125rem;">
<li style="padding-bottom: 0.5rem; margin-bottom: .375rem; list-style-image: url('/images/list-items/circle-section.png');">nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat,</li>
<li style="padding-bottom: 0.5rem; margin-bottom: .375rem; list-style-image: url('/images/list-items/circle-section.png');">Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl,</li>
<li style="padding-bottom: 0.5rem; margin-bottom: .375rem; list-style-image: url('/images/list-items/circle-section.png');">ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse, or</li>
<li style="padding-bottom: 0.5rem; margin-bottom: .375rem; list-style-image: url('/images/list-items/circle-section.png');">molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit or</li>
</ul>
</li>
<li style="padding-bottom: 0.5rem; margin-bottom: .375rem; list-style-image: url('/images/list-items/square-section.png');">Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</body></html>