Pdf | |
The PdfTextSection type exposes the following members.
| Name | Description | |
|---|---|---|
| PdfTextSection(Single, Single, String) | Creates a text object using a default Helvetica 9pt font. | |
| PdfTextSection(Single, Single, String, PdfFont) | Creates a text object that can be added to the header or footer templates of a pdf document. | |
| PdfTextSection(Single, Single, Single, String, PdfFont) | Creates a text object that can be added to the header or footer templates of a pdf document. | |
| PdfTextSection(Single, Single, Single, Single, String, PdfFont) | Creates a text object that can be added to the header or footer templates of a pdf document. | |
| PdfTextSection(Single, Single, Single, String, PdfFont, PdfColor) | Creates a text object that can be added to the header or footer templates of a pdf document. | |
| PdfTextSection(Single, Single, Single, Single, String, PdfFont, PdfColor) | Creates a text object that can be added to the header or footer templates of a pdf document. |
| Name | Description | |
|---|---|---|
| BackColor | Gets or sets the element background color. | |
| CharacterSpacing | Gets or sets the spacing between the text characters. | |
| Direction | Gets or sets an angle to control the text direction. | |
| EmbedFont | A flag indicating if the text font will be embedded in the pdf document. | |
| Font | The text font. | |
| ForeColor | Gets or sets the element foreground color. | |
| Height |
Gets or sets the element height, in points, in the destination pdf page.
(Inherited from PdfSectionElement) | |
| HorizontalAlign | Gets or sets the horizontal text alignment. | |
| Leading | Gets or sets the text leading (the distance between the baselines of consecutive lines of text). | |
| RightToLeft | Gets or sets a flag indicating if the text is written from right to left. | |
| Text | The text string that will be added to the pdf document header or footer. | |
| TextRise | Gets or sets the distance to move the text baseline up or down from its default location. | |
| Transparency | Gets or sets the pdf element transparency. | |
| VerticalAlign | Gets or sets the vertical text alignment. | |
| Width |
Gets or sets the element width, in points, in the destination pdf page.
(Inherited from PdfSectionElement) | |
| WordSpacing | Gets or sets the spacing between the text words. | |
| X |
Gets or sets the element position on the X axis.
(Inherited from PdfSectionElement) | |
| Y |
Gets or sets the element position on the Y axis.
(Inherited from PdfSectionElement) |
HtmlToPdf converter = new HtmlToPdf(); converter.Options.DisplayFooter = true; PdfFont font = PdfFont.CreateStandardFont(PdfStandardFont.Helvetica, 10); PdfTextSection text = new PdfTextSection(0, 10, "Page {page_number} of {total_pages}", font); text.HorizontalAlign = PdfTextHorizontalAlign.Center; text.ForeColor = new PdfColor(0, 0, 0); converter.Footer.Add(text); PdfDocument doc = converter.ConvertUrl("https://www.google.com"); doc.Save("out.pdf"); doc.Close();