0
我有一个包含±50个单词的文本。所以我想将它添加在同一小区内 这里是我的代码:如何在同一个单元格中添加多行 - PDF
//header
$this->SetX(30);
$this->Cell(270, 20, "Suggested Improvement ",0, 0, 'C', true);
$this->SetX(300);
$this->Cell(270, 20, "Current Situation ",0, 0, 'C', true);
//data retrieved from DB
$this->Ln(20);
$this->SetTextColor(0);
$this->SetFillColor(19, 68, 160);
$this->SetLineWidth(0.25);
$this->SetX(30.5);
$this->Cell(269, 100,$row1['Suggested Improvement'], 1, 0, 'C', false);
$this->SetX(300);
$this->Cell(269.5, 100,$row1['Current Situation'], 1, 0, 'L', false);
但问题是,文本不填充在细胞中,它打印为一条线,因为它是如下所示:
我怎样才能让文字从右上角开始,在仅此块来填充?
您使用什么库来生成PDF文件? – Phylogenesis
[使用FPDF在单元格中生成文本换行?]可能的副本(https://stackoverflow.com/questions/3477372/make-text-wrap-in-a-cell-with-fpdf) – Phylogenesis
@Phylogenesis \t I也使用'multicell',但它给了我相同的结果。我只在我的php脚本中包含require('fpdf.php')' –