ClassFixedContentEditor
Edit fixed-page content by positioning text, images, forms, and shapes with precise coordinates, clipping, and state management. Use to draw directly onto a page or form XObject and control layout via the current IPosition and clipping stack; coordinates originate at the top-left with X to the right and Y downward.
Definition
Namespace:Telerik.Windows.Documents.Fixed.Model.Editing
Assembly:Telerik.Windows.Documents.Fixed.dll
Syntax:
public class FixedContentEditor : FixedContentEditorBase
Inheritance: objectFixedContentEditorBaseFixedContentEditor
Derived Classes:
Inherited Members
Constructors
FixedContentEditor(IContentRootElement, IPosition, bool)
Initializes a new instance of the FixedContentEditor class.
Declaration
public FixedContentEditor(IContentRootElement root, IPosition initialPosition, bool autoTag = false)
Parameters
root
The root.
initialPosition
The initial position.
autoTag
A value indicating whether to automatically tag the content with structure tags.
FixedContentEditor(IContentRootElement, bool)
Initializes a new instance of the FixedContentEditor class.
Declaration
public FixedContentEditor(IContentRootElement root, bool autoTag = false)
Parameters
root
The root.
autoTag
A value indicating whether to automatically tag the content with structure tags.
Properties
Clipping
Gets the current clipping object which defines the visible region for content rendering. Content drawn outside the current clipping region will not be visible in the document. Returns null if no clipping is currently defined.
Position
Gets or sets the current position where content will be added in the document. The position is used as the starting point for rendering operations and is updated automatically when content is added.
Root
Gets the root element for the fixed content, which serves as the container for all content created by this editor. This is typically a page or form object in a PDF document.
Declaration
public IContentRootElement Root { get; }
Property Value
The root element that contains all the fixed content.
Methods
Draw(MarkedContent)
Draws the specified element.
Declaration
public void Draw(MarkedContent element)
Parameters
element
The element.
Draw(PositionContentElement)
Draws the specified element.
Declaration
public void Draw(PositionContentElement element)
Parameters
element
The element.
DrawBlock(IBlockElement)
Draws the block.
Declaration
public void DrawBlock(IBlockElement block)
Parameters
block
The block.
DrawBlock(IBlockElement, Size)
Draws the block in given size.
Declaration
public void DrawBlock(IBlockElement block, Size size)
Parameters
block
The block.
size
The size.
DrawCircle(Point, double)
Draws a circle.
DrawEllipse(Point, double, double)
Draws a ellipse.
DrawForm(FormSource)
Draws the form.
Declaration
public void DrawForm(FormSource source)
Parameters
source
The source.
DrawForm(FormSource, Size)
Draws a form.
Declaration
public void DrawForm(FormSource source, Size size)
Parameters
source
The form source.
size
The size.
DrawForm(FormSource, double, double)
Draws a form.
Declaration
public void DrawForm(FormSource source, double width, double height)
Parameters
source
The form source.
width
The width.
height
The height.
DrawImage(ImageSource)
Draws an image from an existing ImageSource (already registered resource).
Declaration
public void DrawImage(ImageSource source)
Parameters
source
The image source.
DrawImage(ImageSource, Size)
Draws an ImageSource scaled to the specified size.
Declaration
public void DrawImage(ImageSource source, Size size)
Parameters
source
The image source.
size
Target size.
DrawImage(ImageSource, double, double)
Draws an ImageSource scaled to the specified width and height.
Declaration
public void DrawImage(ImageSource source, double width, double height)
Parameters
source
The image source.
width
Target width.
height
Target height.
DrawImage(Stream)
Draws an image from a stream at its intrinsic size using the current position.
Declaration
public void DrawImage(Stream stream)
Parameters
stream
The stream containing the encoded image data.
DrawImage(Stream, Size)
Draws an image from a stream scaled to the specified size.
DrawImage(Stream, double, double)
Draws an image from a stream scaled to the specified width and height.
DrawLine(Point, Point)
Draws a line.
DrawLineAnnotation(double, double)
Creates a new LineAnnotation with starting point the current point of the editor and end point the current point of the editor plus the given distances.
DrawPath(GeometryBase)
Draws a path with given geometry.
Declaration
public void DrawPath(GeometryBase geometry)
Parameters
geometry
The geometry.
DrawRectangle(Rect)
Draws a rectangle.
Declaration
public void DrawRectangle(Rect rectangle)
Parameters
rectangle
The rectangle.
DrawStampAnnotation(Size, string)
Creates a new StampAnnotation and draws it with a specified Annotation size and name. This method will add the stamp only in cases when the FixedContentEditor Root supports annotations.
DrawTable(Table)
Draws the table.
DrawTable(Table, Size)
Draws the table.
DrawTable(Table, double)
Draws the table with some fit table width.
DrawText(string)
Draws the text using current text state at the current position.
DrawText(string, Size)
Draws the text.
DrawTextAnnotation(Size, Size, string, bool)
Creates a new TextAnnotation and draws it with a specified size and text and can create a PopupAnnotation to go with it.
Declaration
public void DrawTextAnnotation(Size annotationSize, Size popupSize, string text, bool addPopup = true)
Parameters
annotationSize
The size of the text annotation.
popupSize
The size of the popup annotation.
text
The text that will appear in the popup annotation.
addPopup
A value indicating whether to create a popup for the text annotation.
DrawWidget(RadioButtonField, RadioOption, Size)
Creates new RadioButtonWidget representing a RadioButtonField and draws the widget with a specified Annotation size. This method will add widget only in cases when the FixedContentEditor Root supports annotations.
Declaration
public void DrawWidget(RadioButtonField parentField, RadioOption option, Size annotationSize)
Parameters
parentField
The form field the should be represented by the widget.
option
The option that should be represented by the widget.
annotationSize
The Annotation size.
DrawWidget<T>(FormField<T>, Size)
Creates new Widget representing a FormField and draws the widget with a specified Annotation size. This method will add widget only in cases when the FixedContentEditor Root supports annotations.
Declaration
public void DrawWidget<T>(FormField<T> parentField, Size annotationSize) where T : Widget
Parameters
parentField
FormField<T>
The form field the should be represented by the widget.
annotationSize
The Annotation size.
InsertMarkedContentEnd()
Inserts the end of marked content.
Declaration
public void InsertMarkedContentEnd()
InsertMarkedContentStart(StructureElement)
Inserts marked content start. If no structureTag is provided, the marked content will be tagged as an Artifact.
Declaration
public MarkedContent InsertMarkedContentStart(StructureElement structureTag = null)
Parameters
structureTag
The structure element tag that relates the marked content with the document's structure tree. If null, the content is tagged as an artifact.
Returns
PopClipping()
Pops the clipping.
Declaration
public Clipping PopClipping()
Returns
The clipping that was popped from the stack, or null if the stack is empty.
PushClipping(GeometryBase)
Pushes the clipping.
Declaration
public IDisposable PushClipping(GeometryBase clip)
Parameters
clip
The clip.
Returns
A disposable object that will pop the clipping when disposed.
PushClipping(Rect)
Pushes the clipping.
Declaration
public IDisposable PushClipping(Rect clip)
Parameters
clip
The clip.
Returns
A disposable object that will pop the clipping when disposed.
SavePosition()
Saves the position.
Declaration
public IDisposable SavePosition()
Returns
A disposable object that will restore the position when disposed.