在表格单元格内导致的段落 [英] Paragraph leading inside table cell

查看:322
本文介绍了在表格单元格内导致的段落的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个表格,其中的单元格设置如下:

I have a table with cells set up like this:

Paragraph p = new Paragraph(content,font); 
p.setLeading(30); 
PdfPCell c = new PdfPCell(p);

我的问题是段落前导被忽略。有人可以告诉我如何在表格单元格内设置段落引导?当不在细胞内时,它完美地工作。

My problem is that the paragraph leading is ignored. Can someone please tell me how to set the paragraph leading when inside a table cell? It works perfectly when not inside a cell.

谢谢。

推荐答案

Google为文字模式之间的区别和复合模式。
您正在使用文本模式:单元格的前导被带入
帐户;该段的前导被忽略。
如果你使用复合模式,那就相反了。

Google for the difference between "text mode" and "composite mode". You are using "text mode": the leading of the cell is taken into account; the leading of the paragraph is ignored. If you use "composite mode", it's the other way round.

尝试:

PdfPCell c = new PdfPCell(); 
c.addElement(p); 

这篇关于在表格单元格内导致的段落的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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