Table of Contents

Method TextStyle

Namespace
BitMiracle.Docotic.Pdf.Layout
Assembly
BitMiracle.Docotic.Pdf.Layout.dll

TextStyle(TextStyle)

Sets the default text style for the main page content.

public PageLayout TextStyle(TextStyle textStyle)

Parameters

textStyle TextStyle

The text style.

Returns

PageLayout

The updated page layout.

Remarks

This method prepares a result of applying the provided style on top of Document style. The result becomes the default style for content in Header(), Footer(), and Content() containers.

For certain containers, Header, Footer, and Body styles can complement the style set by this method. Hyperlink style complements style of text spans with hyperlinks.

Read the Text style section of the How to layout PDF pages article for examples of using text styles.

Exceptions

ArgumentNullException

textStyle is null.

ArgumentException

textStyle or its fallback belongs to a different Document.

TextStyle(Func<Typography, TextStyle>)

Sets the default text style for the main page content.

public PageLayout TextStyle(Func<Typography, TextStyle> provider)

Parameters

provider Func<Typography, TextStyle>

The method that accepts a typography object and returns a text style.

Returns

PageLayout

The updated page layout.

Remarks

This method prepares a result of applying the provided style on top of Document style. The result becomes the default style for content in Header(), Footer(), and Content() containers.

For certain containers, Header, Footer, and Body styles can complement the style set by this method. Hyperlink style complements style of text spans with hyperlinks.

Read the Text style section of the How to layout PDF pages article for examples of using text styles.

Exceptions

ArgumentNullException

provider is null.

ArgumentException

provider returns a text style belonging to a different Document.