Struct genpdf::SimplePageDecorator[][src]

pub struct SimplePageDecorator { /* fields omitted */ }
Expand description

Prepares a page of a document with margins and a header.

Per default, this decorator does not modify the page. If margins have been set with the set_margins method, they are applied to every page. If a header callback is configured with the set_header method, it will be called for every page and its return value will be rendered at the beginning of the page (after the margins have been applied).

Implementations

Creates a new page decorator that does not modify the page.

Sets the margins for all pages of this document.

If this method is not called, the full page is used.

Sets the header generator for this document.

The given closure will be called once per page. Its argument is the page number (starting with 1), and its return value will be rendered at the top of the page. The document content will start directly after the element.

Trait Implementations

Returns the “default value” for a type. Read more

Prepares the page with the given area before it is filled with the document content and returns the writable area of the page. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.