Class DocDevice

Class DocDevice

Namespace: Aspose.Html.Rendering.Doc
Assembly: Aspose.HTML.dll (25.2.0)

Represents rendering to a DOCX document.

[ComVisible(true)]
public class DocDevice : Device<docdevice.docgraphiccontext, docrenderingoptions="">, IDevice, IDisposable

Inheritance

objectDeviceDevice<docdevice.docgraphiccontext, docrenderingoptions="">DocDevice

Implements

IDevice, IDisposable

Inherited Members

Device<docdevice.docgraphiccontext, docrenderingoptions="">.Initialize(), Device<docdevice.docgraphiccontext, docrenderingoptions="">.SaveGraphicContext(), Device<docdevice.docgraphiccontext, docrenderingoptions="">.RestoreGraphicContext(), Device<docdevice.docgraphiccontext, docrenderingoptions="">.GetExtension(), Device<docdevice.docgraphiccontext, docrenderingoptions="">.BeginDocument(Document), Device<docdevice.docgraphiccontext, docrenderingoptions="">.EndDocument(), Device<docdevice.docgraphiccontext, docrenderingoptions="">.BeginPage(SizeF), Device<docdevice.docgraphiccontext, docrenderingoptions="">.EndPage(), Device<docdevice.docgraphiccontext, docrenderingoptions="">.Flush(), Device<docdevice.docgraphiccontext, docrenderingoptions="">.BeginElement(Element, RectangleF), Device<docdevice.docgraphiccontext, docrenderingoptions="">.EndElement(Element), Device<docdevice.docgraphiccontext, docrenderingoptions="">.ClosePath(), Device<docdevice.docgraphiccontext, docrenderingoptions="">.MoveTo(PointF), Device<docdevice.docgraphiccontext, docrenderingoptions="">.LineTo(PointF), Device<docdevice.docgraphiccontext, docrenderingoptions="">.AddRect(RectangleF), Device<docdevice.docgraphiccontext, docrenderingoptions="">.CubicBezierTo(PointF, PointF, PointF), Device<docdevice.docgraphiccontext, docrenderingoptions="">.Stroke(), Device<docdevice.docgraphiccontext, docrenderingoptions="">.Fill(FillRule), Device<docdevice.docgraphiccontext, docrenderingoptions="">.Clip(FillRule), Device<docdevice.docgraphiccontext, docrenderingoptions="">.StrokeAndFill(FillRule), Device<docdevice.docgraphiccontext, docrenderingoptions="">.FillText(string, PointF), Device<docdevice.docgraphiccontext, docrenderingoptions="">.StrokeText(string, PointF), Device<docdevice.docgraphiccontext, docrenderingoptions="">.DrawImage(byte[], WebImageFormat, RectangleF), Device<docdevice.docgraphiccontext, docrenderingoptions="">.Dispose(), Device<docdevice.docgraphiccontext, docrenderingoptions="">.Dispose(bool), Device<docdevice.docgraphiccontext, docrenderingoptions="">.Options, Device<docdevice.docgraphiccontext, docrenderingoptions="">.Configuration, Device<docdevice.docgraphiccontext, docrenderingoptions="">.GraphicContext, Device<docdevice.docgraphiccontext, docrenderingoptions="">.StreamProvider, Device<docdevice.docgraphiccontext, docrenderingoptions="">.OutputStream, Device<docdevice.docgraphiccontext, docrenderingoptions="">.PageIndex, object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Constructors

DocDevice(ICreateStreamProvider)

Initializes a new instance of the Aspose.Html.Rendering.Doc.DocDevice class.

public DocDevice(ICreateStreamProvider streamProvider)

Parameters

streamProvider ICreateStreamProvider

Object that implements the Aspose.Html.IO.ICreateStreamProvider interface

DocDevice(DocRenderingOptions, ICreateStreamProvider)

Initializes a new instance of the Aspose.Html.Rendering.Doc.DocDevice class by rendering options and stream provider.

public DocDevice(DocRenderingOptions options, ICreateStreamProvider streamProvider)

Parameters

options DocRenderingOptions

Rendering options.

streamProvider ICreateStreamProvider

Object that implements the Aspose.Html.IO.ICreateStreamProvider interface

DocDevice(string)

Initializes a new instance of the Aspose.Html.Rendering.Doc.DocDevice class by output file name.

public DocDevice(string file)

Parameters

file string

The output file name

DocDevice(DocRenderingOptions, string)

Initializes a new instance of the Aspose.Html.Rendering.Doc.DocDevice class by rendering options and output file name.

public DocDevice(DocRenderingOptions options, string file)

Parameters

options DocRenderingOptions

Rendering options.

file string

The output file name

DocDevice(Stream)

Initializes a new instance of the Aspose.Html.Rendering.Doc.DocDevice class by output stream.

public DocDevice(Stream stream)

Parameters

stream Stream

The output stream

DocDevice(DocRenderingOptions, Stream)

Initializes a new instance of the Aspose.Html.Rendering.Doc.DocDevice class by rendering options and output stream.

public DocDevice(DocRenderingOptions options, Stream stream)

Parameters

options DocRenderingOptions

Rendering options.

stream Stream

The output stream

Methods

AddRect(RectangleF)

Appends a rectangle to the current path as a complete subpath.

public override void AddRect(RectangleF rect)

Parameters

rect RectangleF

A rectangle to draw.

BeginDocument(Document)

Begins rendering of the document.

public override void BeginDocument(Document document)

Parameters

document Document

The document.

BeginElement(Element, RectangleF)

Begins rendering of the html node.

public override bool BeginElement(Element element, RectangleF rect)

Parameters

element Element

The html element.

rect RectangleF

Bounding box of the node.

Returns

bool

Returns [true] if element should be processed.

BeginPage(SizeF)

Begins rendering of the new page.

public override void BeginPage(SizeF size)

Parameters

size SizeF

Size of the page.

Clip(FillRule)

Modifies the current clipping path by intersecting it with the current path, using the FillMode rule to determine the region to fill. This method terminates current path.

public override void Clip(FillRule mode)

Parameters

mode FillRule

Filling mode specifies how the interior of a closed path is clipped

ClosePath()

Closes the current subpath by appending a straight line segment from the current point to the starting point of the subpath. If the current subpath is already closed, “ClosePath” does nothing. This operator terminates the current subpath. Appending another segment to the current path begins a new subpath, even if the new segment begins at the endpoint reached by the “ClosePath” method.

public override void ClosePath()

CubicBezierTo(PointF, PointF, PointF)

Appends a cubic Bézier curve to the current path. The curve extends from the current point to the point pt2, using pt1 and pt2 as the Bézier control points. The new current point is pt3.

public override void CubicBezierTo(PointF pt1, PointF pt2, PointF pt3)

Parameters

pt1 PointF

Coordinates of first point

pt2 PointF

Coordinates of second point

pt3 PointF

Coordinates of third point

DrawImage(byte[], WebImageFormat, RectangleF)

Draws the specified image.

public override void DrawImage(byte[] data, WebImageFormat imageFormat, RectangleF rect)

Parameters

data byte[]

An array of bytes representing the image.

imageFormat WebImageFormat

Image format.

rect RectangleF

A rectangel which determines position and size to draw.

EndElement(Element)

Ends rendering of the html node.

public override void EndElement(Element element)

Parameters

element Element

The html element.

EndPage()

Ends rendering of the current page.

public override void EndPage()

Fill(FillRule)

Fills the entire region enclosed by the current path. If the path consists of several disconnected subpaths, it fills the insides of all subpaths, considered together. This method terminates current path.

public override void Fill(FillRule mode)

Parameters

mode FillRule

Filling mode specifies how the interior of a closed path is filled

FillText(string, PointF)

Fills the specified text string at the specified location.

public override void FillText(string text, PointF pt)

Parameters

text string

String to fill.

pt PointF

Point that specifies the coordinates of the text.

Flush()

Flushes all data to output stream.

public override void Flush()

GetExtension()

Gets extension of the output file.

protected override string GetExtension()

Returns

string

The file extension.

Initialize()

Initializes context stack.

protected override void Initialize()

LineTo(PointF)

Appends a straight line segment from the current point to the point (pt). The new current point is pt.

public override void LineTo(PointF pt)

Parameters

pt PointF

Point of where to create the line to.

MoveTo(PointF)

Begins a new subpath by moving the current point to coordinates of the parameter pt, omitting any connecting line segment. If the previous path construction method in the current path was also “MoveTo”, the new “MoveTo” overrides it; no vestige of the previous “MoveTo” operation remains in the path.

public override void MoveTo(PointF pt)

Parameters

pt PointF

Point of where to move the path to.

Stroke()

Strokes a line along the current path. The stroked line follows each straight or curved segment in the path, centered on the segment with sides parallel to it. Each of the path’s subpaths is treated separately. This method terminates current path.

public override void Stroke()

StrokeAndFill(FillRule)

Strokes and fill current path. This method terminates current path.

public override void StrokeAndFill(FillRule mode)

Parameters

mode FillRule

Filling mode specifies how the interior of a closed path is filled.

StrokeText(string, PointF)

Strokes the specified text string at the specified location.

public override void StrokeText(string text, PointF pt)

Parameters

text string

String to stroke.

pt PointF

Point that specifies the coordinates where to start the text. </docdevice.docgraphiccontext,></docdevice.docgraphiccontext,></docdevice.docgraphiccontext,></docdevice.docgraphiccontext,></docdevice.docgraphiccontext,></docdevice.docgraphiccontext,></docdevice.docgraphiccontext,></docdevice.docgraphiccontext,></docdevice.docgraphiccontext,></docdevice.docgraphiccontext,></docdevice.docgraphiccontext,></docdevice.docgraphiccontext,></docdevice.docgraphiccontext,></docdevice.docgraphiccontext,></docdevice.docgraphiccontext,></docdevice.docgraphiccontext,></docdevice.docgraphiccontext,></docdevice.docgraphiccontext,></docdevice.docgraphiccontext,></docdevice.docgraphiccontext,></docdevice.docgraphiccontext,></docdevice.docgraphiccontext,></docdevice.docgraphiccontext,></docdevice.docgraphiccontext,></docdevice.docgraphiccontext,></docdevice.docgraphiccontext,></docdevice.docgraphiccontext,></docdevice.docgraphiccontext,></docdevice.docgraphiccontext,></docdevice.docgraphiccontext,></docdevice.docgraphiccontext,></docdevice.docgraphiccontext,></docdevice.docgraphiccontext,>