Table of Contents

Class PdfCanvas

Namespace
BitMiracle.Docotic.Pdf
Assembly
BitMiracle.Docotic.Pdf.dll

Class for a canvas (a two-dimensional region on which all painting occurs).

public sealed class PdfCanvas
Inheritance
PdfCanvas
Inherited Members

Remarks

The Docotic.Pdf Library Documentation page contains links to articles, guides, and sample code.

Properties

BlendMode

(PDF 1.4) Gets or sets the current blend mode.

Brush

Gets the PdfBrush object that encapsulates the properties related to non-stroking operations.

CharacterSpacing

Gets or sets the current character spacing.

CurrentPosition

Gets or sets the current position for path operations.

FlatnessTolerance

Gets or sets the flatness tolerance.

Font

Gets or sets the current font for text-drawing operation.

FontSize

Gets or sets the size of the current font in points.

Pen

Gets the PdfPen object that encapsulates the properties related to stroking operations.

TextAngle

Gets or sets the text rotation angle in degrees.

TextHorizontalScaling

Gets or sets the current horizontal scaling of text.

TextPosition

Gets or sets the current text position.

TextRenderingMode

Gets or sets the current text rendering mode.

TextRise

Gets or sets the current text rise.

TransformationMatrix

Gets the current transformation matrix for this PdfCanvas.

WordSpacing

Gets or sets the current word spacing.

Methods

AppendArc(PdfPoint, double, double, double, double)

Appends a straight line segment and an arc representing a portion of an ellipse specified by radius and center to the current path.

AppendArc(PdfRectangle, PdfPoint, PdfPoint)

Appends an arc representing a portion of an ellipse specified by PdfRectangle structure and two radial endpoints to the current path.

AppendArc(PdfRectangle, PdfPoint, PdfPoint, bool)

Appends an arc representing a portion of an ellipse specified by PdfRectangle structure, two radial endpoints and a direction to the current path.

AppendCircle(PdfPoint, double)

Appends a circle with specified center coordinates and radius to the current path.

AppendCurveTo(PdfPoint, PdfPoint, PdfPoint)

Appends a cubic Bézier curve to the current path.

AppendEllipse(PdfRectangle)

Appends an ellipse specified by a bounding PdfRectangle structure to the current path.

AppendLineTo(PdfPoint)

Appends a straight line segment from the CurrentPosition to specified endpoint to the current path.

AppendLineTo(double, double)

Appends a straight line segment from the CurrentPosition to specified endpoint to the current path.

AppendPie(PdfRectangle, PdfPoint, PdfPoint)

Appends a pie shape defined by an ellipse specified by a PdfRectangle structure and two radial lines to the current path.

AppendPie(PdfRectangle, double, double)

Appends a pie shape defined by an ellipse specified by a PdfRectangle structure and two radial lines to the current path.

AppendRectangle(PdfRectangle)

Appends a rectangle specified by a PdfRectangle structure to the current path as a complete subpath.

AppendRectangle(PdfRectangle, double)

Appends a rotated rectangle specified by a PdfRectangle structure to the current path as a complete subpath.

AppendRoundedRectangle(PdfRectangle, PdfSize)

Appends a rectangle structure with rounded corners specified by a PdfRectangle to the current path as a complete subpath.

BeginMarkedContent(PdfTagType, IPdfPropertyList?)

Begins marked content sequence with predefined tag.

BeginMarkedContent(string, IPdfPropertyList?)

Begins marked content sequence with arbitrary tag.

Clear()

Clears the entire canvas and resets all current graphics parameters to their defaults.

CloseAndStrokePath()

Closes and strokes the current path.

ClosePath()

Closes the current subpath by appending a straight line segment from the CurrentPosition to the starting point of the subpath.

DrawArc(PdfPoint, double, double, double, double)

Draws a straight line and an arc representing a portion of an ellipse specified by radius and center.

DrawArc(PdfRectangle, PdfPoint, PdfPoint)

Draws an arc representing a portion of an ellipse specified by PdfRectangle structure and two radial endpoints.

DrawArc(PdfRectangle, PdfPoint, PdfPoint, bool)

Draws an arc representing a portion of an ellipse specified by PdfRectangle structure, two radial endpoints and a direction.

DrawCircle(PdfPoint, double)

Draws a circle with specified center coordinates and radius.

DrawCircle(PdfPoint, double, PdfDrawMode)

Draws a circle with specified center coordinates and radius.

DrawCurveTo(PdfPoint, PdfPoint, PdfPoint)

Draws a cubic Bézier curve.

DrawEllipse(PdfRectangle)

Draws an ellipse specified by a bounding PdfRectangle structure.

DrawEllipse(PdfRectangle, PdfDrawMode)

Draws an ellipse specified by a bounding PdfRectangle structure.

DrawImage(PdfImage, PdfPoint)

Draws the specified image, using its original size, at the specified location.

DrawImage(PdfImage, PdfPoint, PdfSize, double)

Draws the specified image at the specified location with specified size and with the specified rotation.

DrawImage(PdfImage, PdfPoint, double)

Draws the specified image, using its original size, at the specified location and with the specified rotation.

DrawImage(PdfImage, double, double)

Draws the specified image, using its original size, at the specified location.

DrawImage(PdfImage, double, double, double)

Draws the specified image, using its original size, at the specified location and with the specified rotation.

DrawImage(PdfImage, double, double, double, double, double)

Draws the specified image at the specified location with specified size and with the specified rotation.

DrawLineTo(PdfPoint)

Draws a straight line segment from the CurrentPosition to specified endpoint.

DrawLineTo(double, double)

Draws a straight line segment from the CurrentPosition to specified endpoint.

DrawPie(PdfRectangle, PdfPoint, PdfPoint)

Draws a pie shape defined by an ellipse specified by a PdfRectangle structure and two radial lines.

DrawPie(PdfRectangle, PdfPoint, PdfPoint, PdfDrawMode)

Draws a pie shape defined by an ellipse specified by a PdfRectangle structure and two radial lines.

DrawPie(PdfRectangle, double, double)

Draws a pie shape defined by an ellipse specified by a PdfRectangle structure and two radial lines.

DrawPie(PdfRectangle, double, double, PdfDrawMode)

Draws a pie shape defined by an ellipse specified by a PdfRectangle structure and two radial lines.

DrawRectangle(PdfRectangle)

Draws a rectangle specified by a PdfRectangle structure.

DrawRectangle(PdfRectangle, PdfDrawMode)

Draws a rectangle specified by a PdfRectangle structure.

DrawRectangle(PdfRectangle, double)

Draws a rotated rectangle specified by a PdfRectangle structure.

DrawRectangle(PdfRectangle, double, PdfDrawMode)

Draws a rotated rectangle specified by a PdfRectangle structure.

DrawRoundedRectangle(PdfRectangle, PdfSize)

Draws a rectangle structure with rounded corners specified by a PdfRectangle structure.

DrawRoundedRectangle(PdfRectangle, PdfSize, PdfDrawMode)

Draws a rectangle structure with rounded corners specified by a PdfRectangle structure.

DrawString(PdfPoint, string)

Draws the specified text string starting from the specified position.

DrawString(PdfPoint, string, PdfStringDrawingOptions)

Draws the specified text string starting from the specified position using the specified options.

DrawString(IEnumerable<PdfCharacterCode>)

Draws the text defined by the specified character codes starting from the current TextPosition.

DrawString(double, double, string)

Draws the specified text string starting from the specified position.

DrawString(double, double, string, PdfStringDrawingOptions)

Draws the specified text string starting from the specified position using the specified options.

DrawString(string)

Draws the specified text string starting from the current TextPosition.

DrawString(string, PdfStringDrawingOptions)

Draws the specified text string starting from the current TextPosition using the specified options.

DrawText(string, PdfTextDrawingOptions)

Draws the specified text string using the specified formatting options.

DrawXObject(PdfXObject, PdfPoint)

Draws the specified XObject, using its original size, at the specified location.

DrawXObject(PdfXObject, PdfPoint, PdfSize, double)

Draws the specified object at the specified location with specified size and with the specified rotation.

DrawXObject(PdfXObject, PdfPoint, double)

Draws the specified object, using its original size, at the specified location and with the specified rotation.

DrawXObject(PdfXObject, double, double)

Draws the specified object, using its original size, at the specified location.

DrawXObject(PdfXObject, double, double, double)

Draws the specified object, using its original size, at the specified location and with the specified rotation.

DrawXObject(PdfXObject, double, double, double, double, double)

Draws the specified object at the specified location with specified size and with the specified rotation.

EndMarkedContent()

Ends marked content sequence.

FillAndStrokePath(PdfFillMode)

Fills and then strokes the current path using the specified rule to determine the region to fill.

FillPath(PdfFillMode)

Fills the current path using the specified rule to determine the region to fill.

GetText()

Retrieves all text drawn on the canvas in plain text format.

GetTextData()

Gets all text drawn on the canvas as the collection of the PdfTextData objects.

GetTextHeight()

Gets the height of a text in default user space units when drawn with current Font.

GetTextWidth(string)

Gets the width of the specified string in default user space units when drawn with current Font.

GetTextWidth(string, PdfMissingGlyphMapper?)

Gets the width of the specified string in default user space units when drawn with current Font.

MeasureText(string)

Measures the specified string when drawn with current Font.

MeasureText(string, PdfMissingGlyphMapper?)

Measures the specified string when drawn with current Font.

MoveInlineImagesToResources()

Moves all inline images to resources.

MoveInlineImagesToResources(Predicate<PdfImage>)

Moves some of the inline images to resources.

ResetPath()

Resets the current path.

ResetTransform()

Resets the current transformation matrix of this PdfCanvas to the identity matrix.

RestoreState()

Restores the last saved graphics state.

RotateTransform(double)

Applies the specified rotation to the transformation matrix of this PdfCanvas.

SaveState()

Saves the current graphics state.

ScaleTransform(double, double)

Applies the specified scaling operation to the transformation matrix of this PdfCanvas by prepending it to the transformation matrix.

SetClip(PdfFillMode)

Modifies the current clipping path by intersecting it with the current path, using the specified rule to determine which regions lay inside the clipping path.

SkewTransform(double, double)

Skews the x axis by an angle alpha and the y axis by an angle beta.

StrokePath()

Strokes the current path.

Transform(PdfMatrix)

Transforms coordinate system of this PdfCanvas by multiplying its current transformation matrix by specified PdfMatrix.

TranslateTransform(double, double)

Changes the origin of the coordinate system by prepending the specified translation to the transformation matrix of this PdfCanvas.