[英]TCPDF image bottom alignment inside table
我正在尝试将图像与td元素的底部对齐,以实现类似的效果(三个图像(与其他图像的高度无关,将始终位于td的底部)):
预期的:
使用以下标记:
<?php
// create some HTML content
$html = '<h1>Image alignments on HTML table</h1>
<table cellpadding="0" cellspacing="0" border="1" style="text-align:center;">
<tr>
<td width="33%">
<img src="signature1.png" border="0" align="bottom"/>
</td>
<td width="33%">
<img src="signature2.png" border="1" align="bottom" style="margin-bottom: 0px;" />
</td>
<td width="33%" align="bottom">
<img src="signature3.png" border="0" align="bottom" style="padding: 5px;" />
</td>
</tr>
</table>';
// output the HTML content
$pdf->writeHTML($html, true, false, true, false, '');
//Close and output PDF document
$pdf->Output('example_006.pdf', 'I');
但是,TCPDF不支持填充或边距规则,并且我得到以下结果:
现实:
官方文档中有align bottom属性,但是它不起作用。
注意:值得一提的是,图像周围没有透明像素(在重要的顶部或底部...),例如:
提前致谢 !
可悲的是,TCPDF最终没有支持填充或边距,这意味着我需要的东西在技术上是不可能的。 我决定转到使用CSS规则( 特别是本文中提到的垂直对齐)允许这种行为的Dompdf 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.