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
TextStyleThe 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
isnull
.- 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
isnull
.- ArgumentException
provider
returns a text style belonging to a different Document.