Pdf | |
The PdfElement type exposes the following members.
| Name | Description | |
|---|---|---|
| PdfElement |
| Name | Description | |
|---|---|---|
| ActualText |
Gets or sets the exact text represented by this element (the structure element's
/ActualText entry), used when the drawn glyphs do not map to readable text.
(Inherited from PdfPageElement) | |
| AlternateText |
Gets or sets the alternate text describing this element for assistive technology (the
structure element's /Alt entry). Required on figures for PDF/UA conformance.
(Inherited from PdfPageElement) | |
| Artifact |
Gets or sets a value indicating whether this element is an artifact — decorative or layout
content that carries no meaning and is excluded from the logical structure (backgrounds,
rules, running headers). Takes precedence over TagType.
(Inherited from PdfPageElement) | |
| BackColor | Gets or sets the background fill color. | |
| Blending | Gets or sets the blending mode. | |
| ColorSpace | Gets or sets the color space for the pdf element rendering. | |
| ForeColor | Gets or sets the foreground color used for drawing outlines and text. | |
| Gradient | Gets or sets the gradient fill. When set, overrides BackColor for fills. | |
| LineStyle | Gets or sets the line style for outline drawing. | |
| Rotated | Gets a value indicating whether a rotation has been applied. | |
| Scaled | Gets a value indicating whether a scale has been applied. | |
| Skewed | Gets a value indicating whether a skew has been applied. | |
| TagType |
Gets or sets the structure type used to tag this element in a tagged (accessible) document.
Ignored unless the document's tagged mode (PdfDocument.Tagged) is enabled. Null
(default) leaves the element untagged unless Artifact is set.
(Inherited from PdfPageElement) | |
| Translated | Gets a value indicating whether a translation has been applied. | |
| Transparency | Gets or sets the transparency level (0 = completely transparent, 100 = completely opaque). |
| Name | Description | |
|---|---|---|
| Rotate | Applies a rotation transformation. | |
| Scale | Applies a scale transformation. | |
| Skew | Applies a skew transformation. | |
| Translate | Applies a translation transformation. |
PdfDocument document = new PdfDocument(); PdfPage page = document.AddPage(); PdfRectangleElement rect = new PdfRectangleElement(20, 20, 200, 100); rect.BackColor = new PdfColor(0, 120, 215); // inherited styling rect.ForeColor = new PdfColor(0, 0, 0); rect.Transparency = 80; // 0 = transparent, 100 = opaque rect.Rotate(15); // inherited transform page.Add(rect); document.Save("out.pdf"); document.Close();