not working insider table columns in mPDF Download MPDF

问题描述 投票:-2回答:2

我有个问题。表列中,<ol type="A">不工作。

在这里,在mpdf_view.php应用我的代码

<?php  $html=   '   
<table>
<tbody>
';

$html.='
<tr><td>Menimbang</td><td>:</td>
<td>

<ol type="a">
<li>Text here lorem ipsum ibisque totum.</li>
<li>Text here lorem ipsum ibisque totum.></li>
</ol>';


$html.=' 
</td>
</tr>
</tbody>
</table>
';


$html.='</body>
</html>';

///////////////////////////
        $this->m_pdf->pdf->WriteHTML($html);
        $this->m_pdf->pdf->Output();

////////////////////////
?>

Download MPDF libraries/mpdf

在文件夹图书馆有M_pdf.php /

<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
//include_once APPPATH.'/third_party/mpdf/mpdf.php';
require_once dirname(__file__).'/mpdf/mpdf.php';
class M_pdf {
    public $param;
    public $pdf;
    public function __construct($param = "'c', 'A4-L'")
    {
        $this->param =$param;
        $this->pdf = new mPDF($this->param);
    }
}

===

我的控制器:

public function print_mpdf()
    {
        $this->load->library('M_pdf');
        $this->load->view('mpdf_view');
php codeigniter html-table html-lists mpdf
2个回答
0
投票

不使用“=”运营商类型。

<ol type="a">
  <li>test</li>
  <li>test2</li>
  <li>test3</li>
</ol>

0
投票

新的问题是关于为什么mpdf库不与应用的造型/类型显示<ol>。据对mpdf HTML support属性type手册中<ol> html元素被支撑。

注:这是回答原来的问题有关在HTML小写字母显示<ol>名单。

有两个选项这里要么使用支持type html attribute of <ol>(数字)的1aA(小写或大写字母)和iI(小写,大写罗马数字),或使用CSS样式与更多的选择list-style-type property

使用type HTML属性(建议如果使用的mpdf):

<ol type="a">
  <li>test1</li>
  <li>test2</li>
  <li>test3</li>
</ol>

使用list-style-type CSS属性(建议在普通HTML):

ol.alphabetic-list {
    list-style-type: lower-alpha;
}
<ol class="alphabetic-list">
  <li>test1</li>
  <li>test2</li>
  <li>test3</li>
</ol>
© www.soinside.com 2019 - 2024. All rights reserved.