Module elements

Module elements 

Source
Expand description

Elements of a PDF document.

This module provides implementations of the Element trait that can be used to render and arrange text and shapes.

It includes the following elements:

  • Containers:
  • Text:
    • Text: a single line of text
    • Paragraph: a wrapped and aligned paragraph of text
  • Wrappers:
  • Other:
    • Image: an image (requires the images feature)
    • Break: adds forced line breaks as a spacer
    • PageBreak: adds a forced page break

You can create custom elements by implementing the Element trait.

Modulesยง

images ๐Ÿ”’
Image support for genpdfi-rs.
latex ๐Ÿ”’
LaTeX formula support for genpdfi-rs.
mermaid ๐Ÿ”’
Mermaid diagram element.

Structsยง

Break
A line break.
BulletPoint
A bullet point in a list.
FrameCellDecorator
A cell decorator that draws frames around table cells.
FramedElement
Adds a frame around the wrapped element.
Image
An image to embed in the PDF.
Latex
A LaTeX formula element that renders mathematical expressions using MicroTeX.
LinearLayout
Arranges a list of elements sequentially.
Mermaid
Element that renders a Mermaid diagram into the PDF as an SVG image.
OrderedList
An ordered list of elements with arabic numbers.
PaddedElement
Adds a padding to the wrapped element.
PageBreak
A page break.
Paragraph
A multi-line wrapped paragraph of formatted text.
StyledElement
Adds a default style to the wrapped element and its children.
TableLayout
Arranges elements in columns and rows.
TableLayoutRow
A row of a table layout.
Text
A single line of formatted text.} A single line of formatted text.
UnorderedList
An unordered list of elements with bullet points.

Traitsยง

CellDecorator
A decorator for table cells.
IntoBoxedElement
Helper trait for creating boxed elements.