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 declares 69 methods for ContentStreamBuilder objects in .NET programs.
Available methods include: BeginMarkedContent, BeginMarkedContentWithProps, BeginText, Build, Clip, ClipEvenOdd, ClipPath, ClipPathEvenOdd, CloseAndStroke, CloseFillAndStroke, CloseFillAndStrokeEvenOdd, ClosePath, and 53 additional methods.
Public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package.
Properties: Spelling.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
Spelling | RealSpelling | Read/Write | How a real is spelled here. |
Methods
| Signature | Description |
|---|---|
Drain() | What has been written since this was last asked. |
SaveState() | Calls SaveState on this ContentStreamBuilder instance. |
RestoreState() | Calls RestoreState on this ContentStreamBuilder instance. |
SetGraphicsState(name: string) | Select the named /ExtGState from the resources (gs, PDF32000 §8.4.4). |
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. |
SetFillCmyk(c: double, m: double, y: double, k: double) | Fill in the four-component subtractive space (k). |
SetStrokeCmyk(c: double, m: double, y: double, k: double) | Stroke in the four-component subtractive space (K). |
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. |
SetMiterLimit(limit: double) | How far a sharp corner may extend before it is cut off (M). |
SetFlatness(tolerance: double) | How closely a curve is followed when it is flattened into lines (i). |
SetRenderingIntent(intent: string) | Which way a colour outside the device’s range is brought into it (ri). |
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. |
CurveToV(x2: double, y2: double, x3: double, y3: double) | A cubic curve whose FIRST control point is the current point (v). |
CurveToY(x1: double, y1: double, x3: double, y3: double) | A cubic curve whose SECOND control point is its end point (y). |
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. |
FillAndStrokeEvenOdd() | Calls FillAndStrokeEvenOdd on this ContentStreamBuilder instance. |
CloseAndStroke() | Calls CloseAndStroke on this ContentStreamBuilder instance. |
CloseFillAndStroke() | Close the path, then fill and stroke it (b). |
CloseFillAndStrokeEvenOdd() | Close, then fill by the even-odd rule and stroke (b*). |
EndPath() | Calls EndPath on this ContentStreamBuilder instance. |
Clip() | Narrow what may be painted to the path being built, and end it by painting nothing (W n). |
ClipEvenOdd() | The same by the even-odd rule (W* n). |
ClipPath() | Narrow what may be painted to the path being built (W), and nothing else. |
ClipPathEvenOdd() | The same by the even-odd rule (W*). |
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. |
MoveTextPositionWithLeading(tx: double, ty: double) | Move to the next line AND set the leading to the negative of the vertical move (TD). |
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. |
ShowTextToken(token: string) | Show a string the caller has ALREADY written, brackets and all (Tj). |
NextLineShowTextToken(token: string) | Move to the next line and show a written string, as one instruction (’). |
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). |
ShowTextHexKerned(glyphIds: byte[], adjustments: double[]) | Show hex-encoded 2-byte glyph ids as a TJ array with inter-glyph adjustments. |
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. |