fpdf多单元格中的行高 [英] Line height in fpdf multicell

查看:184
本文介绍了fpdf多单元格中的行高的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用fpdf multicell显示地址.地址中的每一行都会以新行显示,例如:

I am using fpdf multicell to display an address. Each line in the address will be displayed in a new line like :

           102 South Avenue
           Suite 107
           Scottsdale AZ 85260
           111-000-1111

但是每行之间的行高都比新行高.知道如何在FPDF中设置MultiCell的行高吗?

But the line height between each line is more than a new line. Any idea how to set the line height for MultiCell in FPDF?

推荐答案

Height是多单元格中每个文本行的高度,而不是整个多单元格元素的高度.

Height is height of each text line in multicell, not height of whole multicell element.

multiCell的作用是将给定的文本分散到多个单元格中,这意味着第二个参数定义每行(单个单元格)的高度,而不是将所有单元格的高度定义为一个集体.

What multiCell does is to spread the given text into multiple cells, this means that the second parameter defines the height of each line (individual cell) and not the height of all cells as a collective.

MultiCell(float w,float h,字符串txt [,混合边框[,字符串align [,布尔填充]]])

MultiCell(float w, float h, string txt [, mixed border [, string align [, boolean fill]]])

您可以在此处阅读完整文档.

You can read the full documentation here.

这篇关于fpdf多单元格中的行高的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆