From 24a8628bc23abaee9e24572adf6673e3faa9df98 Mon Sep 17 00:00:00 2001 From: Adrian-George Bostan Date: Tue, 25 Sep 2018 21:54:01 +0300 Subject: [PATCH] Fix StyledParagraph calculated height inside table --- pdf/creator/table.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdf/creator/table.go b/pdf/creator/table.go index 38e6ccec..67de6fa6 100644 --- a/pdf/creator/table.go +++ b/pdf/creator/table.go @@ -216,7 +216,7 @@ func (table *Table) GeneratePageBlocks(ctx DrawContext) ([]*Block, DrawContext, sp.SetWidth(w - cell.indent) } - newh := sp.Height() + sp.margins.bottom + sp.margins.bottom + newh := sp.Height() + sp.margins.top + sp.margins.bottom newh += 0.5 * sp.getTextHeight() // TODO: Make the top margin configurable? if newh > h { diffh := newh - h