ContentStreamBuilder

ContentStreamBuilder

Overview

ContentStreamBuilder is a class in Aspose.PDF FOSS for .NET.

Builds PDF content stream bytes using the operator syntax from PDF32000 §8-9.

This class provides 51 methods for working with ContentStreamBuilder objects in .NET programs. Available methods include: BeginMarkedContent, BeginMarkedContentWithProps, BeginText, Build, Clip, ClipEvenOdd, CloseAndStroke, ClosePath, CurveTo, DrawXObject, EndMarkedContent, EndPath, and 35 additional methods. All public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package.

Methods

SignatureDescription
SaveState()Calls SaveState on this ContentStreamBuilder instance.
RestoreState()Calls RestoreState on this ContentStreamBuilder instance.
SetMatrix(a: double, b: double, c: double, d: double, e: double, f: double)Sets the matrix value.
SetFillColor(r: double, g: double, b: double)Sets the fill color value.
SetFillColor(color: Color)Sets the fill color value.
SetStrokeColor(r: double, g: double, b: double)Sets the stroke color value.
SetStrokeColor(color: Color)Sets the stroke color value.
SetFillGray(gray: double)Sets the fill gray value.
SetStrokeGray(gray: double)Sets the stroke gray value.
SetLineWidth(width: double)Sets the line width value.
SetDashPattern(pattern: double[], phase: double)Sets the dash pattern value.
SetLineCap(cap: int)Sets the line cap value.
SetLineJoin(join: int)Sets the line join value.
MoveTo(x: double, y: double)Calls MoveTo(x, y) on this ContentStreamBuilder instance.
LineTo(x: double, y: double)Calls LineTo(x, y) on this ContentStreamBuilder instance.
CurveTo(x1: double, y1: double, x2: double, y2: double, x3: double, y3: double)Calls CurveTo(x1, y1, x2, y2, x3, y3) on this ContentStreamBuilder instance.
Rectangle(x: double, y: double, width: double, height: double)Calls Rectangle(x, y, width, height) on this ContentStreamBuilder instance.
ClosePath()Calls ClosePath on this ContentStreamBuilder instance.
Stroke()Calls Stroke on this ContentStreamBuilder instance.
Fill()Calls Fill on this ContentStreamBuilder instance.
FillEvenOdd()Calls FillEvenOdd on this ContentStreamBuilder instance.
FillAndStroke()Calls FillAndStroke on this ContentStreamBuilder instance.
CloseAndStroke()Calls CloseAndStroke on this ContentStreamBuilder instance.
EndPath()Calls EndPath on this ContentStreamBuilder instance.
Clip()Calls Clip on this ContentStreamBuilder instance.
ClipEvenOdd()Calls ClipEvenOdd on this ContentStreamBuilder instance.
BeginText()Calls BeginText on this ContentStreamBuilder instance.
EndText()Calls EndText on this ContentStreamBuilder instance.
SetFont(fontName: string, size: double)Sets the font value.
MoveTextPosition(tx: double, ty: double)Calls MoveTextPosition(tx, ty) on this ContentStreamBuilder instance.
SetTextMatrix(a: double, b: double, c: double, d: double, e: double, f: double)Sets the text matrix value.
SetLeading(leading: double)Sets the leading value.
NextLine()Calls NextLine on this ContentStreamBuilder instance.
SetCharSpacing(spacing: double)Sets the char spacing value.
SetWordSpacing(spacing: double)Sets the word spacing value.
SetHorizontalScaling(percent: double)Horizontal text scaling (Tz), expressed as a percentage of the normal width (100 = unscaled).
SetTextRenderingMode(mode: int)Sets the text rendering mode value.
SetTextRise(rise: double)Sets the text rise value.
ShowText(text: string)Calls ShowText(text) on this ContentStreamBuilder instance.
ShowTextBytes(bytes: byte[])Show pre-encoded single-byte text.
ShowTextHex(glyphIds: byte[])Show text using a hex-encoded string (for CIDFont glyph IDs).
DrawXObject(name: string)Calls DrawXObject(name) on this ContentStreamBuilder instance.
SetExtGState(name: string)Sets the ext g state value.
BeginMarkedContent(tag: string)Calls BeginMarkedContent(tag) on this ContentStreamBuilder instance.
BeginMarkedContent(tag: string, mcid: int)Calls BeginMarkedContent(tag, mcid) on this ContentStreamBuilder instance.
BeginMarkedContentWithProps(tag: string, propsDictInline: string)BDC with an inline properties dictionary (already-serialized PDF dict literal).
EndMarkedContent()Calls EndMarkedContent on this ContentStreamBuilder instance.
BeginMarkedContent(info: Tagged.MarkedContentInfo)Begin a marked content sequence using a MarkedContentInfo from a StructureElementBuilder.
Raw(operatorText: string)Calls Raw(operatorText) on this ContentStreamBuilder instance.
Build()Build the content stream as a byte array.
ToString()Build the content stream as a string.

See Also

 English