Sablon.Processor.SectionProperties (sablon v0.4.3)

Copy Markdown View Source

Applies document level section properties supplied at render time.

Currently only start_page_number is supported, which sets the number the first page of the section is numbered with.

Summary

Functions

Writes the environment's section properties into xml_node.

Sets the number the first page of the section is numbered with.

The w:start value of the section's w:pgNumType, or nil.

Applies a properties map to the w:sectPr element of xml_node.

Functions

process(document, env)

Writes the environment's section properties into xml_node.

put_start_page_number(xml_node, number)

@spec put_start_page_number(Sablon.XML.Node.t(), term()) :: :ok

Sets the number the first page of the section is numbered with.

A part without a w:sectPr element - a header, for instance - has no section to configure and is left untouched.

start_page_number(xml_node)

@spec start_page_number(Sablon.XML.Node.t()) :: binary() | nil

The w:start value of the section's w:pgNumType, or nil.

write_properties(xml_node, properties)

@spec write_properties(Sablon.XML.Node.t(), map()) :: :ok

Applies a properties map to the w:sectPr element of xml_node.