This sample shows how to manage text styles using the Typography
class from Docotic.Pdf.Layout add-on.
The Typography class allows you to define and use text styles without keeping intermediate variables.
The library automatically applies some predefined styles (Document
, Header
, Body
, Footer
, Hyperlink
) to the corresponding document parts.
Use Document.Typography methods
to modify standard styles or provide a custom Typography
implementation.
Later, use the Typography
object in the PageLayout.TextStyle(Func<Typography, TextStyle>),
LayoutContainer.TextStyle(Func<Typography, TextStyle>),
TextContainer.Style(Func<Typography, TextStyle>),
and other similar methods.
This sample code uses free Docotic.Pdf.Layout add-on for Docotic.Pdf library.