Tables (rinoh.table)

class rinoh.table.Table(body, head=None, align=None, width=None, column_widths=None, id=None, style=None, parent=None)
style_class

alias of TableStyle

prepare(flowable_target)

Determine number labels and register references with the document

render(container, last_descender, state, space_below=0, **kwargs)

Renders the flowable’s content to container, with the flowable’s top edge lining up with the container’s cursor. descender is the descender height of the preceding line or None.

class rinoh.table.TableWithCaption(flowables, align=None, width=None, id=None, style=None, parent=None, source=None)
style_class

alias of TableWithCaptionStyle

class rinoh.table.TableWithCaptionStyle(base=None, **attributes)

Style class for TableWithCaption

float

Float the flowable to the top or bottom of the current page, to a dedicated page, or sideways to a dedicated page (inherited from FloatStyle)

Accepts FloatLocation: none, here, sideways

Default: None

width

Width to render the flowable at (inherited from FlowableStyle)

Accepts FlowableWidth: auto, fill or a numeric value followed by a unit (pt, in, pc, mm, cm, %, /2, /4)

Default: auto

horizontal_align

Horizontal alignment of the flowable (inherited from FlowableStyle)

Accepts HorizontalAlignment: left, right, center

Default: left

space_above

Vertical space preceding the flowable (inherited from FlowableStyle)

Accepts Dimension: a numeric value followed by a unit (pt, in, pc, mm, cm, %, /2, /4)

Default: 0

space_below

Vertical space following the flowable (inherited from FlowableStyle)

Accepts Dimension: a numeric value followed by a unit (pt, in, pc, mm, cm, %, /2, /4)

Default: 0

margin_left

Left margin (inherited from FlowableStyle)

Accepts Dimension: a numeric value followed by a unit (pt, in, pc, mm, cm, %, /2, /4)

Default: 0

margin_right

Right margin (inherited from FlowableStyle)

Accepts Dimension: a numeric value followed by a unit (pt, in, pc, mm, cm, %, /2, /4)

Default: 0

padding

Padding (inherited from FlowableStyle)

Accepts Dimension: a numeric value followed by a unit (pt, in, pc, mm, cm, %, /2, /4)

Default: 0

padding_left

Left padding (inherited from FlowableStyle)

Accepts Dimension: a numeric value followed by a unit (pt, in, pc, mm, cm, %, /2, /4)

Default: 0

padding_right

Right padding (inherited from FlowableStyle)

Accepts Dimension: a numeric value followed by a unit (pt, in, pc, mm, cm, %, /2, /4)

Default: 0

padding_top

Top padding (inherited from FlowableStyle)

Accepts Dimension: a numeric value followed by a unit (pt, in, pc, mm, cm, %, /2, /4)

Default: 0

padding_bottom

Bottom padding (inherited from FlowableStyle)

Accepts Dimension: a numeric value followed by a unit (pt, in, pc, mm, cm, %, /2, /4)

Default: 0

keep_with_next

Keep this flowable and the next on the same page (inherited from FlowableStyle)

Accepts Bool: true or false

Default: false

border

Border surrounding the flowable (inherited from FlowableStyle)

Accepts Stroke: the width (Dimension) and color (Color) of the stroke, separated by a comma (,)

Default: none

border_left

Border left of the flowable (inherited from FlowableStyle)

Accepts Stroke: the width (Dimension) and color (Color) of the stroke, separated by a comma (,)

Default: none

border_right

Border right of the flowable (inherited from FlowableStyle)

Accepts Stroke: the width (Dimension) and color (Color) of the stroke, separated by a comma (,)

Default: none

border_top

Border above the flowable (inherited from FlowableStyle)

Accepts Stroke: the width (Dimension) and color (Color) of the stroke, separated by a comma (,)

Default: none

border_bottom

Border below the flowable (inherited from FlowableStyle)

Accepts Stroke: the width (Dimension) and color (Color) of the stroke, separated by a comma (,)

Default: none

background_color

Color of the area within the flowable’s borders (inherited from FlowableStyle)

Accepts Color: HEX string with optional alpha component (#RRGGBB, #RRGGBBAA, #RGB or #RGBA)

Default: none

page_break

Type of page break to insert before rendering this flowable (inherited from FlowableStyle)

Accepts Break: none, any, left, right, any restart, left restart, right restart

Default: None

hide

Suppress rendering this element (inherited from Style)

Accepts Bool: true or false

Default: false

title

Title to precede the flowables (inherited from GroupedFlowablesStyle)

Accepts StyledText: a list of styled text strings, separated by spaces. A styled text string is a quoted string (' or "), optionally followed by a style name enclosed in braces: 'text string' (style name)

Default: (no value)

flowable_spacing

Spacing between flowables (inherited from GroupedFlowablesStyle)

Accepts Dimension: a numeric value followed by a unit (pt, in, pc, mm, cm, %, /2, /4)

Default: 0

same_page

Keep all flowables on a single page, if possible. (inherited from GroupedFlowablesStyle)

Accepts Bool: true or false

Default: false

class rinoh.table.TableSection(rows, style=None, parent=None)
prepare(flowable_target)

Determine number labels and register references with the document

class rinoh.table.TableHead(rows, style=None, parent=None)
class rinoh.table.TableBody(rows, style=None, parent=None)
class rinoh.table.TableRow(cells, style=None, parent=None)
prepare(flowable_target)

Determine number labels and register references with the document

get_rowspanned_columns()

Return a dictionary mapping column indices to the number of columns spanned.

class rinoh.table.TableCell(flowables, rowspan=1, colspan=1, id=None, style=None, parent=None)
style_class

alias of TableCellStyle

class rinoh.table.TableCellBorder(rendered_cell, cell_height, position, style=None)
style_class

alias of TableCellBorderStyle

class rinoh.table.TableCellBackground(bottom_left, width, height, style=None, parent=None)
style_class

alias of TableCellBackgroundStyle

class rinoh.table.VerticalAlign

Accepts: top, middle, bottom

class rinoh.table.ListOfTables(local=False, id=None, style=None, parent=None)
class rinoh.table.ListOfTablesSection
list_class

alias of ListOfTables