Message Box

class pdfpug.modules.MessageBox(body, header=None, **kwargs)

A MessageBox can be used to display information in a distinct style that captures the attention of the reader.

Parameters:
  • header (Optional[str]) – title
  • List] body (Union[str,) – message
  • color (Optional[Color]) – color
  • size (Optional[Size]) – size
  • state (Optional[MessageState]) – state
>>> from pdfpug.modules import MessageBox
>>> from pdfpug.common import MessageState
>>> message = MessageBox(
...     header="Important Announcement",
...     body="MessageBox is really good at capturing the attention of the reader!",
...     state=MessageState.info
... )
../_images/negative_messagebox.png
class pdfpug.common.MessageState

Enum Message box style options

positive = 'positive'

Positive message

negative = 'negative'

Negative Message

error = 'error'

Error message

success = 'success'

Success message

warning = 'warning'

Warning message

info = 'info'

Info message