Click or drag to resize
Pdf Library for .NET

PdfPageElement Class

Abstract base class for all graphic elements that can be added to a PDF page or template (text, images, shapes, links). Concrete elements are created directly and placed on a page with Add(PdfPageElement). In the full edition this base also carries the tagging properties used when producing a tagged (accessible) document.
Inheritance Hierarchy
SystemObject
  SelectPdf.UniversalPdfPageElement
    More

Namespace: SelectPdf.Universal
Assembly: SelectPdf.Universal (in SelectPdf.Universal.dll) Version: 26.4
Syntax
public abstract class PdfPageElement

The PdfPageElement type exposes the following members.

Constructors
 NameDescription
Protected methodPdfPageElement 
Top
Properties
 NameDescription
Public propertyActualText 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.
Public propertyAlternateText 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.
Public propertyArtifact 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.
Public propertyTagType 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.
Top
Example
PdfDocument document = new PdfDocument();
PdfPage page = document.AddPage();
// Every concrete element derives from PdfPageElement, so the tagging
// properties are shared.
PdfRectangleElement rule = new PdfRectangleElement(20, 20, 200, 4);
rule.BackColor = new PdfColor(0, 120, 215);
rule.Artifact = true; // decorative rule, excluded from the logical structure
page.Add(rule);
document.Save("out.pdf");
document.Close();
See Also
Inheritance Hierarchy