Paragraph

class pdfpug.modules.Paragraph(text, **kwargs)

Paragraphs are considered as one of the core elements of any report with each paragraph being a self-contained unit around a central idea.

Parameters:
  • text (str) – Paragraph text
  • alignment (ParagraphAlignment) – Horizontal paragraph alignment (defaults to ParagraphAlignment.left)

Instantiating a paragraph is as simple as the following,

>>> from pdfpug.modules import Paragraph
>>> para = Paragraph("Lorem Ipsum is simply dummy text of the printing industry")

This component supports rich HTML formatting options like <b>, <i>, <u> tags.

>>> para = Paragraph("Lorem Ipsum is <b>simply</b> <u>dummy</u> text!")
class pdfpug.common.ParagraphAlignment

Enum Alignment options

center = 'center'

Center align content

left = 'left'

Left align content

right = 'right'

Right align content