Click or drag to resize

PDF Page Elements Overview

A page element represents anything that can be added to a renderer (a page or a template), and it derives from the PageElement abstract class. The document model defines two types of page elements: graphic elements, which derive from the PageGraphicElement class, and interactive page elements, which derive directly from the PageElement class.

The graphic elements have common properties like fore color, back color, transparency and rotation. Examples of graphic elements are the HTML to PDF element, the Word to PDF element, the text element, the image element and the shape elements. Examples of interactive page elements are the internal link element, the URL link element, the text note element and the file attachment element.

In a tagged document, the TagType, AlternateText, ActualText and Artifact properties of an element say what the element is for assistive technology (see Tagged PDF).

Page Graphic Elements

The document model defines the following graphic elements that can be added to a page:

The page graphic elements derive from the PageGraphicElement class. This class defines the following properties and methods that change the aspect of the element:

  • ForeColor - the color used to draw a shape, for example the color of a line when drawing a line element or the text color when drawing a text.

  • BackColor - the background color of a graphic element, for example the fill color of a rectangle element.

  • Gradient - a gradient color used to fill a shape like a rectangle element.

  • Rotate(Single) - rotates the coordinates system clockwise by the specified angle before the element is rendered. Translate(Single, Single), Scale(Single, Single) and Skew(Single, Single) transform the coordinates system the same way.

  • Transparency - the element transparency, a value between 0 and 100: 0 means completely transparent and 100 (the default) means completely opaque.

  • LineStyle - the line width, dash style, line join style and line cap style of the elements that draw lines, like the rectangle, ellipse and line elements.

  • ColorSpace - the color space (RGB, CMYK or grayscale) the element colors are written in.

Page Interactive Elements

The page interactive elements derive directly from the PageElement class. They add interactive features to the PDF document like internal and URL links, file attachments and links, popup text notes and digital signatures.

The document model defines the following interactive elements: DigitalSignatureElement, LinkUrlElement, InternalLinkElement, SoundLinkElement, FileLinkElement, FileAttachmentElement and TextNoteElement. They can be added to a page or to a template; on a template they are created on each page the template is drawn on.

See Also

Other Resources

Overview