diff --git a/pdf/creator/styled_paragraph.go b/pdf/creator/styled_paragraph.go index 6da44da5..3c4bb77c 100644 --- a/pdf/creator/styled_paragraph.go +++ b/pdf/creator/styled_paragraph.go @@ -104,6 +104,11 @@ func (p *StyledParagraph) Append(text string, style TextStyle) { p.wrapText() } +func (p *StyledParagraph) Reset(text string, style TextStyle) { + p.chunks = []TextChunk{} + p.Append(text, style) +} + // SetTextAlignment sets the horizontal alignment of the text within the space provided. func (p *StyledParagraph) SetTextAlignment(align TextAlignment) { p.alignment = align