iTextSharp.text.pdf.PdfDocument.FitsPage C# (CSharp) Метод

FitsPage() приватный Метод

private FitsPage ( PdfPTable table, float margin ) : bool
table PdfPTable
margin float
Результат bool
        internal bool FitsPage(PdfPTable table, float margin)
        {
            if (!table.LockedWidth) {
                float totalWidth = (IndentRight - IndentLeft) * table.WidthPercentage / 100;
                table.TotalWidth = totalWidth;
            }
            // ensuring that a new line has been started.
            EnsureNewLine();
            float spaceNeeded = table.SkipFirstHeader ? table.TotalHeight - table.HeaderHeight : table.TotalHeight;
            return spaceNeeded + (currentHeight > 0 ? table.SpacingBefore : 0f)
                <= IndentTop - currentHeight - IndentBottom - margin;
        }