New to Telerik UI for WinForms? Start a free 30-day trial

IPdfEditor

Interface

Defines drawing-state and primitive operations used by PDF export.

Definition

Namespace:Telerik.WinControls.Export

Assembly:Telerik.WinControls.dll

Syntax:

C#
public interface IPdfEditor

Properties

Gets the horizontal offset of the current drawing position.

C#
double OffsetX { get; }

Gets the vertical offset of the current drawing position.

C#
double OffsetY { get; }

Methods

Replaces the current drawing position with a new matrix position.

C#
void CreateMatrixPosition()

Resets the current position and then translates it by the supplied offsets.

C#
void CreateMatrixPosition(double x, double y)
Parameters:xdouble

Horizontal offset that will be set as new Matrix position

ydouble

Vertical offset that will be set as new Matrix position

Draws a line between two points.

C#
void DrawLine(PointF startPoint, PointF endPoint)
Parameters:startPointPointF

The line's starting point.

endPointPointF

The line's ending point.

Draws a rectangle bounded by the specified corners.

C#
void DrawRectangle(PointF topLeft, PointF bottomRight)
Parameters:topLeftPointF

The rectangle's top-left corner.

bottomRightPointF

The rectangle's bottom-right corner.

Removes the most recently pushed clipping rectangle.

C#
void PopClipping()

Restricts subsequent drawing to the specified clipping rectangle.

C#
void PushClipping(double x, double y, double width, double height)
Parameters:xdouble

The rectangle's horizontal origin.

ydouble

The rectangle's vertical origin.

widthdouble

The rectangle's width.

heightdouble

The rectangle's height.

Restores the drawing position saved by SavePosition().

C#
void RestorePosition()

Restores the graphic and text properties saved by SaveProperties().

C#
void RestoreProperties()

Saves the current drawing position.

C#
void SavePosition()

Saves the current graphic and text properties.

C#
void SaveProperties()

Sets the color used to fill shapes.

C#
void SetFillColor(Color color)
Parameters:colorColor

The fill color.

This creates a linear gradient depending on number of colors needed

C#
void SetLinearGradient(int numberOfColors, PointF startPoint, PointF endPoint, Color color, Color color2, Color color3, Color color4)
Parameters:numberOfColorsint

The number of gradient colors to use.

startPointPointF

The starting point of the gradient.

endPointPointF

The ending point of the gradient.

colorColor

The first gradient color.

color2Color

The second gradient color.

color3Color

The third gradient color.

color4Color

The fourth gradient color.

Sets the color used for stroked shapes and lines.

C#
void SetStrokeColor(Color color)
Parameters:colorColor

The stroke color.

Sets the font size used for subsequent text drawing.

C#
void SetTextFontSize(double size)
Parameters:sizedouble

The font size.

Translates the current drawing position by the specified offsets.

C#
void TranslatePosition(double x, double y)
Parameters:xdouble

The horizontal translation.

ydouble

The vertical translation.

Attempts to select a font by name and style.

C#
bool TrySetFont(string fontName, FontStyle fontStyle)
Parameters:fontNamestring

The font family name.

fontStyleFontStyle

The requested font style.

Returns:

bool

true if the font was set; otherwise, false.