作者:200355人 | 来源:互联网 | 2023-09-24 11:40
本文整理了Java中com.itextpdf.text.pdf.PdfPTable.spacingBefore()
方法的一些代码示例,展示了PdfPTable.spacingBefore()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。PdfPTable.spacingBefore()
方法的具体详情如下:
包路径:com.itextpdf.text.pdf.PdfPTable
类名称:PdfPTable
方法名:spacingBefore
PdfPTable.spacingBefore介绍
[英]The spacing before the table.
[中]桌子前的间隔。
代码示例
代码示例来源:origin: com.itextpdf/itextg
/**
* Checks if a PdfPTable
fits the current page of the PdfDocument
.
*
* @param table the table that has to be checked
* @param margin a certain margin
* @return true
if the PdfPTable
fits the page, false
otherwise.
*/
boolean fitsPage(final PdfPTable table, final float margin) {
if (!table.isLockedWidth()) {
float totalWidth = (indentRight() - indentLeft()) * table.getWidthPercentage() / 100;
table.setTotalWidth(totalWidth);
}
// ensuring that a new line has been started.
ensureNewLine();
Float spaceNeeded = table.isSkipFirstHeader() ? table.getTotalHeight() - table.getHeaderHeight() : table.getTotalHeight();
return spaceNeeded + (currentHeight > 0 ? table.spacingBefore() : 0f) <= indentTop() - currentHeight - indentBottom() - margin;
}
代码示例来源:origin: com.itextpdf/itextpdf
/**
* Checks if a PdfPTable
fits the current page of the PdfDocument
.
*
* @param table the table that has to be checked
* @param margin a certain margin
* @return true
if the PdfPTable
fits the page, false
otherwise.
*/
boolean fitsPage(final PdfPTable table, final float margin) {
if (!table.isLockedWidth()) {
float totalWidth = (indentRight() - indentLeft()) * table.getWidthPercentage() / 100;
table.setTotalWidth(totalWidth);
}
// ensuring that a new line has been started.
ensureNewLine();
Float spaceNeeded = table.isSkipFirstHeader() ? table.getTotalHeight() - table.getHeaderHeight() : table.getTotalHeight();
return spaceNeeded + (currentHeight > 0 ? table.spacingBefore() : 0f) <= indentTop() - currentHeight - indentBottom() - margin;
}
代码示例来源:origin: com.itextpdf/itextpdf
yTemp += descender;
if (rowIdx == 0 && adjustFirstLine) {
yTemp -= table.spacingBefore();
代码示例来源:origin: com.itextpdf/itextg
yTemp += descender;
if (rowIdx == 0 && adjustFirstLine) {
yTemp -= table.spacingBefore();