Click or drag to resize

PageObject Class

An object drawn on a page: text, an image, a path, a group or a gradient. Obtained from a page's ObjectModel. Changes are applied to the page at once and written when the document is saved.
Inheritance Hierarchy

Namespace: ExpertPdf.Anywhere.PdfDocument
Assembly: ExpertPdf.Anywhere (in ExpertPdf.Anywhere.dll) Version: 22.0
Syntax
public abstract class PageObject

The PageObject type exposes the following members.

Properties
 NameDescription
Public propertyBounds Gets the box the object covers on the page, in points from the top-left corner of the page as displayed.
Public propertyFillColor Gets or sets the color the object is filled with. Reading it gives an RGB approximation; the empty color when it cannot be expressed in RGB (a pattern, a spot color). Setting it paints the object in RGB.
Public propertyKindGets the kind of the object.
Public propertyLayer Gets or sets the layer the object is drawn in, or null when it is in none. Setting it moves the object into the layer; null takes it out of every layer.
Public propertyOpacity Gets or sets the opacity of the object, from 0 (transparent) to 1 (opaque). Reading it gives the fill opacity; setting it sets the fill and the outline opacity.
Public propertyPageGets the page the object is drawn on.
Public propertyParentGets the group the object is drawn in, or null when it is drawn on the page directly.
Public propertyStrokeColorGets or sets the color the object is outlined with (see FillColor).
Top
Methods
 NameDescription
Public methodBringToFrontDraws the object over everything else in its group (or on the page).
Public methodDuplicateDraws a copy of the object just above it, moved by (dx, dy) points, and returns the copy.
Public methodRemoveRemoves the object from the page. A removed object can no longer be used.
Public methodRotateRotates the object about the center of its bounds.
Public methodScaleResizes the object about the top-left corner of its bounds.
Public methodSendToBackDraws the object under everything else in its group (or on the page).
Public methodToStringReturns the kind and bounds of the object.
(Overrides ObjectToString)
Public methodTranslateMoves the object.
Top
Example
PageObject first = document.Pages[0].ObjectModel.Objects[0];
first.Translate(10, -5);
first.FillColor = new PdfColor(200, 0, 0);
first.Opacity = 0.5f;
See Also