HiraokaHyperTools.iTextSharp-LGPL  0.2.5
iTextSharp.text.pdf.PdfContentByte Class Reference
Inheritance diagram for iTextSharp.text.pdf.PdfContentByte:
iTextSharp.text.pdf.PdfCopy.StampContent iTextSharp.text.pdf.PdfTemplate iTextSharp.text.pdf.StampContent iTextSharp.text.pdf.Type3Glyph iTextSharp.text.pdf.PdfAppearance iTextSharp.text.pdf.PdfImportedPage iTextSharp.text.pdf.PdfPSXObject iTextSharp.text.pdf.PdfPatternPainter

Classes

class  GraphicState
 

Public Member Functions

 PdfContentByte (PdfWriter wr)
 
override string ToString ()
 
byte[] ToPdf (PdfWriter writer)
 
void Add (PdfContentByte other)
 
void SetLeading (float v)
 
void SetFlatness (float value)
 
void SetLineCap (int value)
 
void SetLineDash (float value)
 
void SetLineDash (float unitsOn, float phase)
 
void SetLineDash (float unitsOn, float unitsOff, float phase)
 
void SetLineDash (float[] array, float phase)
 
void SetLineJoin (int value)
 
void SetLineWidth (float value)
 
void SetMiterLimit (float value)
 
void Clip ()
 
void EoClip ()
 
virtual void SetGrayFill (float value)
 
virtual void ResetGrayFill ()
 
virtual void SetGrayStroke (float value)
 
virtual void ResetGrayStroke ()
 
virtual void SetRGBColorFillF (float red, float green, float blue)
 
virtual void ResetRGBColorFill ()
 
virtual void SetRGBColorStrokeF (float red, float green, float blue)
 
virtual void ResetRGBColorStroke ()
 
virtual void SetCMYKColorFillF (float cyan, float magenta, float yellow, float black)
 
virtual void ResetCMYKColorFill ()
 
virtual void SetCMYKColorStrokeF (float cyan, float magenta, float yellow, float black)
 
virtual void ResetCMYKColorStroke ()
 
void MoveTo (float x, float y)
 
void LineTo (float x, float y)
 
void CurveTo (float x1, float y1, float x2, float y2, float x3, float y3)
 
void CurveTo (float x2, float y2, float x3, float y3)
 
void CurveFromTo (float x1, float y1, float x3, float y3)
 
void Circle (float x, float y, float r)
 
void Rectangle (float x, float y, float w, float h)
 
void VariableRectangle (Rectangle rect)
 
void Rectangle (Rectangle rectangle)
 
void ClosePath ()
 
void NewPath ()
 
void Stroke ()
 
void ClosePathStroke ()
 
void Fill ()
 
void EoFill ()
 
void FillStroke ()
 
void ClosePathFillStroke ()
 
void EoFillStroke ()
 
void ClosePathEoFillStroke ()
 
virtual void AddImage (Image image)
 
virtual void AddImage (Image image, bool inlineImage)
 
virtual void AddImage (Image image, float a, float b, float c, float d, float e, float f)
 
virtual void AddImage (Image image, float a, float b, float c, float d, float e, float f, bool inlineImage)
 
void Reset ()
 
void Reset (bool validateContent)
 
void BeginText ()
 
void EndText ()
 
void SaveState ()
 
void RestoreState ()
 
void SetCharacterSpacing (float value)
 
void SetWordSpacing (float value)
 
void SetHorizontalScaling (float value)
 
virtual void SetFontAndSize (BaseFont bf, float size)
 
void SetTextRenderingMode (int value)
 
void SetTextRise (float value)
 
void ShowText (string text)
 
void ShowTextKerned (String text)
 
void NewlineShowText (string text)
 
void NewlineShowText (float wordSpacing, float charSpacing, string text)
 
void SetTextMatrix (float a, float b, float c, float d, float x, float y)
 
void SetTextMatrix (float x, float y)
 
void MoveText (float x, float y)
 
void MoveTextWithLeading (float x, float y)
 
void NewlineText ()
 
void AddOutline (PdfOutline outline, string name)
 
float GetEffectiveStringWidth (String text, bool kerned)
 
void ShowTextAligned (int alignment, String text, float x, float y, float rotation)
 
void ShowTextAlignedKerned (int alignment, String text, float x, float y, float rotation)
 
void ConcatCTM (float a, float b, float c, float d, float e, float f)
 
void Arc (float x1, float y1, float x2, float y2, float startAng, float extent)
 
void Ellipse (float x1, float y1, float x2, float y2)
 
PdfPatternPainter CreatePattern (float width, float height, float xstep, float ystep)
 
PdfPatternPainter CreatePattern (float width, float height)
 
PdfPatternPainter CreatePattern (float width, float height, float xstep, float ystep, Color color)
 
PdfPatternPainter CreatePattern (float width, float height, Color color)
 
PdfTemplate CreateTemplate (float width, float height)
 
PdfAppearance CreateAppearance (float width, float height)
 
void AddPSXObject (PdfPSXObject psobject)
 
virtual void AddTemplate (PdfTemplate template, float a, float b, float c, float d, float e, float f)
 
void AddTemplate (PdfTemplate template, float x, float y)
 
virtual void SetCMYKColorFill (int cyan, int magenta, int yellow, int black)
 
virtual void SetCMYKColorStroke (int cyan, int magenta, int yellow, int black)
 
virtual void SetRGBColorFill (int red, int green, int blue)
 
virtual void SetRGBColorStroke (int red, int green, int blue)
 
virtual void SetColorStroke (Color value)
 
virtual void SetColorFill (Color value)
 
virtual void SetColorFill (PdfSpotColor sp, float tint)
 
virtual void SetColorStroke (PdfSpotColor sp, float tint)
 
virtual void SetPatternFill (PdfPatternPainter p)
 
virtual void SetPatternFill (PdfPatternPainter p, Color color)
 
virtual void SetPatternFill (PdfPatternPainter p, Color color, float tint)
 
virtual void SetPatternStroke (PdfPatternPainter p, Color color)
 
virtual void SetPatternStroke (PdfPatternPainter p, Color color, float tint)
 
virtual void SetPatternStroke (PdfPatternPainter p)
 
virtual void PaintShading (PdfShading shading)
 
virtual void PaintShading (PdfShadingPattern shading)
 
virtual void SetShadingFill (PdfShadingPattern shading)
 
virtual void SetShadingStroke (PdfShadingPattern shading)
 
void ShowText (PdfTextArray text)
 
void LocalGoto (string name, float llx, float lly, float urx, float ury)
 
bool LocalDestination (string name, PdfDestination destination)
 
void RemoteGoto (string filename, string name, float llx, float lly, float urx, float ury)
 
void RemoteGoto (string filename, int page, float llx, float lly, float urx, float ury)
 
void RoundRectangle (float x, float y, float w, float h, float r)
 
virtual void SetAction (PdfAction action, float llx, float lly, float urx, float ury)
 
void SetLiteral (string s)
 
void SetLiteral (char c)
 
void SetLiteral (float n)
 
void DrawRadioField (float llx, float lly, float urx, float ury, bool on)
 
void DrawTextField (float llx, float lly, float urx, float ury)
 
void DrawButton (float llx, float lly, float urx, float ury, string text, BaseFont bf, float size)
 
void SetGState (PdfGState gstate)
 
void BeginLayer (IPdfOCG layer)
 
void EndLayer ()
 
virtual void SetDefaultColorspace (PdfName name, PdfObject obj)
 
void Transform (System.Drawing.Drawing2D.Matrix tx)
 
void BeginMarkedContentSequence (PdfStructureElement struc)
 
void EndMarkedContentSequence ()
 
void BeginMarkedContentSequence (PdfName tag, PdfDictionary property, bool inline)
 
void BeginMarkedContentSequence (PdfName tag)
 
void SanityCheck ()
 
virtual void AddFormXObj (PdfStream template, PdfName name, float a, float b, float c, float d, float e, float f)
 

Static Public Member Functions

static PdfTextArray GetKernArray (String text, BaseFont font)
 
static ArrayList BezierArc (float x1, float y1, float x2, float y2, float startAng, float extent)
 

Static Public Attributes

const int ALIGN_CENTER = Element.ALIGN_CENTER
 
const int ALIGN_LEFT = Element.ALIGN_LEFT
 
const int ALIGN_RIGHT = Element.ALIGN_RIGHT
 
const int LINE_CAP_BUTT = 0
 
const int LINE_CAP_ROUND = 1
 
const int LINE_CAP_PROJECTING_SQUARE = 2
 
const int LINE_JOIN_MITER = 0
 
const int LINE_JOIN_ROUND = 1
 
const int LINE_JOIN_BEVEL = 2
 
const int TEXT_RENDER_MODE_FILL = 0
 
const int TEXT_RENDER_MODE_STROKE = 1
 
const int TEXT_RENDER_MODE_FILL_STROKE = 2
 
const int TEXT_RENDER_MODE_INVISIBLE = 3
 
const int TEXT_RENDER_MODE_FILL_CLIP = 4
 
const int TEXT_RENDER_MODE_STROKE_CLIP = 5
 
const int TEXT_RENDER_MODE_FILL_STROKE_CLIP = 6
 
const int TEXT_RENDER_MODE_CLIP = 7
 

Protected Member Functions

virtual void CheckWriter ()
 

Protected Attributes

ByteBuffer content = new ByteBuffer()
 
PdfWriter writer
 
PdfDocument pdf
 
GraphicState state = new GraphicState()
 
ArrayList layerDepth
 
ArrayList stateList = new ArrayList()
 
int separator = '\n'
 

Properties

ByteBuffer InternalBuffer [get]
 
float XTLM [get]
 
float YTLM [get]
 
float CharacterSpacing [get]
 
float WordSpacing [get]
 
float HorizontalScaling [get]
 
float Leading [get]
 
PdfOutline RootOutline [get]
 
PdfWriter PdfWriter [get]
 
PdfDocument PdfDocument [get]
 
virtual PdfContentByte Duplicate [get]
 

Detailed Description

PdfContentByte is an object containing the user positioned text and graphic contents of a page. It knows how to apply the proper font encoding.

Constructor & Destructor Documentation

◆ PdfContentByte()

iTextSharp.text.pdf.PdfContentByte.PdfContentByte ( PdfWriter  wr)

Constructs a new PdfContentByte-object.

Parameters
wrthe writer associated to this content

Member Function Documentation

◆ Add()

void iTextSharp.text.pdf.PdfContentByte.Add ( PdfContentByte  other)

Adds the content of another PdfContent-object to this object.

Parameters
otheranother PdfByteContent-object

◆ AddFormXObj()

virtual void iTextSharp.text.pdf.PdfContentByte.AddFormXObj ( PdfStream  template,
PdfName  name,
float  a,
float  b,
float  c,
float  d,
float  e,
float  f 
)
virtual

◆ AddImage() [1/4]

virtual void iTextSharp.text.pdf.PdfContentByte.AddImage ( Image  image)
virtual

Adds an Image to the page. The Image must have absolute positioning.

Parameters
imagethe Image object
Exceptions
DocumentExceptionif the Image does not have absolute positioning

◆ AddImage() [2/4]

virtual void iTextSharp.text.pdf.PdfContentByte.AddImage ( Image  image,
bool  inlineImage 
)
virtual

Adds an Image to the page. The Image must have absolute positioning. The image can be placed inline.

Parameters
imagethe Image object
inlineImagetrue to place this image inline, false otherwise
Exceptions
DocumentExceptionif the Image does not have absolute positioning

◆ AddImage() [3/4]

virtual void iTextSharp.text.pdf.PdfContentByte.AddImage ( Image  image,
float  a,
float  b,
float  c,
float  d,
float  e,
float  f 
)
virtual

Adds an Image to the page. The positioning of the Image is done with the transformation matrix. To position an image at (x,y) use AddImage(image, image_width, 0, 0, image_height, x, y).

Parameters
imagethe Image object
aan element of the transformation matrix
ban element of the transformation matrix
can element of the transformation matrix
dan element of the transformation matrix
ean element of the transformation matrix
fan element of the transformation matrix
Exceptions
DocumentExceptionon error

Reimplemented in iTextSharp.text.pdf.PdfPatternPainter, and iTextSharp.text.pdf.PdfImportedPage.

◆ AddImage() [4/4]

virtual void iTextSharp.text.pdf.PdfContentByte.AddImage ( Image  image,
float  a,
float  b,
float  c,
float  d,
float  e,
float  f,
bool  inlineImage 
)
virtual

Adds an Image to the page. The positioning of the Image is done with the transformation matrix. To position an image at (x,y) use AddImage(image, image_width, 0, 0, image_height, x, y). The image can be placed inline.

Parameters
imagethe Image object
aan element of the transformation matrix
ban element of the transformation matrix
can element of the transformation matrix
dan element of the transformation matrix
ean element of the transformation matrix
fan element of the transformation matrix
inlineImagetrue to place this image inline, false otherwise
Exceptions
DocumentExceptionon error

Reimplemented in iTextSharp.text.pdf.Type3Glyph.

◆ AddOutline()

void iTextSharp.text.pdf.PdfContentByte.AddOutline ( PdfOutline  outline,
string  name 
)

Adds a named outline to the document.

Parameters
outlinethe outline
namethe name for the local destination

◆ AddPSXObject()

void iTextSharp.text.pdf.PdfContentByte.AddPSXObject ( PdfPSXObject  psobject)

Adds a PostScript XObject to this content.

Parameters
psobjectthe object

◆ AddTemplate() [1/2]

virtual void iTextSharp.text.pdf.PdfContentByte.AddTemplate ( PdfTemplate  template,
float  a,
float  b,
float  c,
float  d,
float  e,
float  f 
)
virtual

Adds a template to this content.

Parameters
templatethe template
aan element of the transformation matrix
ban element of the transformation matrix
can element of the transformation matrix
dan element of the transformation matrix
ean element of the transformation matrix
fan element of the transformation matrix

Reimplemented in iTextSharp.text.pdf.PdfImportedPage.

◆ AddTemplate() [2/2]

void iTextSharp.text.pdf.PdfContentByte.AddTemplate ( PdfTemplate  template,
float  x,
float  y 
)

Adds a template to this content.

Parameters
templatethe template
xthe x location of this template
ythe y location of this template

◆ Arc()

void iTextSharp.text.pdf.PdfContentByte.Arc ( float  x1,
float  y1,
float  x2,
float  y2,
float  startAng,
float  extent 
)

Draws a partial ellipse inscribed within the rectangle x1,y1,x2,y2, starting at startAng degrees and covering extent degrees. Angles start with 0 to the right (+x) and increase counter-clockwise.

Parameters
x1a corner of the enclosing rectangle
y1a corner of the enclosing rectangle
x2a corner of the enclosing rectangle
y2a corner of the enclosing rectangle
startAngstarting angle in degrees
extentangle extent in degrees

◆ BeginLayer()

void iTextSharp.text.pdf.PdfContentByte.BeginLayer ( IPdfOCG  layer)

Begins a graphic block whose visibility is controled by the layer. Blocks can be nested. Each block must be terminated by an endLayer().

Note that nested layers with PdfLayer#addChild(PdfLayer) only require a single call to this method and a single call to endLayer(); all the nesting control is built in.

Parameters
layerthe layer

◆ BeginMarkedContentSequence() [1/3]

void iTextSharp.text.pdf.PdfContentByte.BeginMarkedContentSequence ( PdfName  tag)

This is just a shorthand to beginMarkedContentSequence(tag, null, false).

Parameters
tagthe tag

◆ BeginMarkedContentSequence() [2/3]

void iTextSharp.text.pdf.PdfContentByte.BeginMarkedContentSequence ( PdfName  tag,
PdfDictionary  property,
bool  inline 
)

Begins a marked content sequence. If property is null the mark will be of the type BMC otherwise it will be BDC.

Parameters
tagthe tag
propertythe property
inlinetrue to include the property in the content or false to include the property in the resource dictionary with the possibility of reusing

◆ BeginMarkedContentSequence() [3/3]

void iTextSharp.text.pdf.PdfContentByte.BeginMarkedContentSequence ( PdfStructureElement  struc)

Begins a marked content sequence. This sequence will be tagged with the structure struc. The same structure can be used several times to connect text that belongs to the same logical segment but is in a different location, like the same paragraph crossing to another page, for example.

Parameters
structhe tagging structure

◆ BeginText()

void iTextSharp.text.pdf.PdfContentByte.BeginText ( )

Starts the writing of text.

◆ BezierArc()

static ArrayList iTextSharp.text.pdf.PdfContentByte.BezierArc ( float  x1,
float  y1,
float  x2,
float  y2,
float  startAng,
float  extent 
)
static

Generates an array of bezier curves to draw an arc.

(x1, y1) and (x2, y2) are the corners of the enclosing rectangle. Angles, measured in degrees, start with 0 to the right (the positive X axis) and increase counter-clockwise. The arc extends from startAng to startAng+extent. I.e. startAng=0 and extent=180 yields an openside-down semi-circle.

The resulting coordinates are of the form float[]{x1,y1,x2,y2,x3,y3, x4,y4} such that the curve goes from (x1, y1) to (x4, y4) with (x2, y2) and (x3, y3) as their respective Bezier control points.

Note: this code was taken from ReportLab (www.reportlab.com), an excelent PDF generator for Python.

Parameters
x1a corner of the enclosing rectangle
y1a corner of the enclosing rectangle
x2a corner of the enclosing rectangle
y2a corner of the enclosing rectangle
startAngstarting angle in degrees
extentangle extent in degrees
Returns
a list of float[] with the bezier curves

◆ CheckWriter()

virtual void iTextSharp.text.pdf.PdfContentByte.CheckWriter ( )
protectedvirtual

Check if we have a valid PdfWriter.

◆ Circle()

void iTextSharp.text.pdf.PdfContentByte.Circle ( float  x,
float  y,
float  r 
)

Draws a circle. The endpoint will (x+r, y).

Parameters
xx center of circle
yy center of circle
rradius of circle

◆ Clip()

void iTextSharp.text.pdf.PdfContentByte.Clip ( )

Modify the current clipping path by intersecting it with the current path, using the nonzero winding number rule to determine which regions lie inside the clipping path.

◆ ClosePath()

void iTextSharp.text.pdf.PdfContentByte.ClosePath ( )

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

◆ ClosePathEoFillStroke()

void iTextSharp.text.pdf.PdfContentByte.ClosePathEoFillStroke ( )

Closes the path, fills it using the even-odd rule to determine the region to fill and strokes it.

◆ ClosePathFillStroke()

void iTextSharp.text.pdf.PdfContentByte.ClosePathFillStroke ( )

Closes the path, fills it using the non-zero winding number rule to determine the region to fill and strokes it.

◆ ClosePathStroke()

void iTextSharp.text.pdf.PdfContentByte.ClosePathStroke ( )

Closes the path and strokes it.

◆ ConcatCTM()

void iTextSharp.text.pdf.PdfContentByte.ConcatCTM ( float  a,
float  b,
float  c,
float  d,
float  e,
float  f 
)

Concatenate a matrix to the current transformation matrix.

Parameters
aan element of the transformation matrix
ban element of the transformation matrix
can element of the transformation matrix
dan element of the transformation matrix
ean element of the transformation matrix
fan element of the transformation matrix

◆ CreateAppearance()

PdfAppearance iTextSharp.text.pdf.PdfContentByte.CreateAppearance ( float  width,
float  height 
)

Creates a new appearance to be used with form fields.

Parameters
widththe bounding box width
heightthe bounding box height
Returns
the appearance created

◆ CreatePattern() [1/4]

PdfPatternPainter iTextSharp.text.pdf.PdfContentByte.CreatePattern ( float  width,
float  height 
)

Create a new colored tiling pattern. Variables xstep and ystep are set to the same values of width and height.

Parameters
widththe width of the pattern
heightthe height of the pattern
Returns
the PdfPatternPainter where the pattern will be created

◆ CreatePattern() [2/4]

PdfPatternPainter iTextSharp.text.pdf.PdfContentByte.CreatePattern ( float  width,
float  height,
Color  color 
)

Create a new uncolored tiling pattern. Variables xstep and ystep are set to the same values of width and height.

Parameters
widththe width of the pattern
heightthe height of the pattern
colorthe default color. Can be null
Returns
the PdfPatternPainter where the pattern will be created

◆ CreatePattern() [3/4]

PdfPatternPainter iTextSharp.text.pdf.PdfContentByte.CreatePattern ( float  width,
float  height,
float  xstep,
float  ystep 
)

Create a new colored tiling pattern.

Parameters
widththe width of the pattern
heightthe height of the pattern
xstepthe desired horizontal spacing between pattern cells. May be either positive or negative, but not zero.
ystepthe desired vertical spacing between pattern cells. May be either positive or negative, but not zero.
Returns
the PdfPatternPainter where the pattern will be created

◆ CreatePattern() [4/4]

PdfPatternPainter iTextSharp.text.pdf.PdfContentByte.CreatePattern ( float  width,
float  height,
float  xstep,
float  ystep,
Color  color 
)

Create a new uncolored tiling pattern.

Parameters
widththe width of the pattern
heightthe height of the pattern
xstepthe desired horizontal spacing between pattern cells. May be either positive or negative, but not zero.
ystepthe desired vertical spacing between pattern cells. May be either positive or negative, but not zero.
colorthe default color. Can be null
Returns
the PdfPatternPainter where the pattern will be created

◆ CreateTemplate()

PdfTemplate iTextSharp.text.pdf.PdfContentByte.CreateTemplate ( float  width,
float  height 
)

Creates a new template.

Creates a new template that is nothing more than a form XObject. This template can be included in this PdfContentByte or in another template. Templates are only written to the output when the document is closed permitting things like showing text in the first page that is only defined in the last page.

Parameters
widththe bounding box width
heightthe bounding box height
Returns
the templated created

◆ CurveFromTo()

void iTextSharp.text.pdf.PdfContentByte.CurveFromTo ( float  x1,
float  y1,
float  x3,
float  y3 
)

Appends a Bêzier curve to the path, starting from the current point.

Parameters
x1x-coordinate of the first control point
y1y-coordinate of the first control point
x3x-coordinaat of the ending point (= new current point)
y3y-coordinaat of the ending point (= new current point)

◆ CurveTo() [1/2]

void iTextSharp.text.pdf.PdfContentByte.CurveTo ( float  x1,
float  y1,
float  x2,
float  y2,
float  x3,
float  y3 
)

Appends a Bêzier curve to the path, starting from the current point.

Parameters
x1x-coordinate of the first control point
y1y-coordinate of the first control point
x2x-coordinate of the second control point
y2y-coordinate of the second control point
x3x-coordinaat of the ending point (= new current point)
y3y-coordinaat of the ending point (= new current point)

◆ CurveTo() [2/2]

void iTextSharp.text.pdf.PdfContentByte.CurveTo ( float  x2,
float  y2,
float  x3,
float  y3 
)

Appends a Bêzier curve to the path, starting from the current point.

Parameters
x2x-coordinate of the second control point
y2y-coordinate of the second control point
x3x-coordinaat of the ending point (= new current point)
y3y-coordinaat of the ending point (= new current point)

◆ DrawButton()

void iTextSharp.text.pdf.PdfContentByte.DrawButton ( float  llx,
float  lly,
float  urx,
float  ury,
string  text,
BaseFont  bf,
float  size 
)

Draws a button.

◆ DrawRadioField()

void iTextSharp.text.pdf.PdfContentByte.DrawRadioField ( float  llx,
float  lly,
float  urx,
float  ury,
bool  on 
)

Draws a TextField.

◆ DrawTextField()

void iTextSharp.text.pdf.PdfContentByte.DrawTextField ( float  llx,
float  lly,
float  urx,
float  ury 
)

Draws a TextField.

◆ Ellipse()

void iTextSharp.text.pdf.PdfContentByte.Ellipse ( float  x1,
float  y1,
float  x2,
float  y2 
)

Draws an ellipse inscribed within the rectangle x1,y1,x2,y2.

Parameters
x1a corner of the enclosing rectangle
y1a corner of the enclosing rectangle
x2a corner of the enclosing rectangle
y2a corner of the enclosing rectangle

◆ EndLayer()

void iTextSharp.text.pdf.PdfContentByte.EndLayer ( )

Ends a layer controled graphic block. It will end the most recent open block.

◆ EndMarkedContentSequence()

void iTextSharp.text.pdf.PdfContentByte.EndMarkedContentSequence ( )

Ends a marked content sequence

◆ EndText()

void iTextSharp.text.pdf.PdfContentByte.EndText ( )

Ends the writing of text and makes the current font invalid.

◆ EoClip()

void iTextSharp.text.pdf.PdfContentByte.EoClip ( )

Modify the current clipping path by intersecting it with the current path, using the even-odd rule to determine which regions lie inside the clipping path.

◆ EoFill()

void iTextSharp.text.pdf.PdfContentByte.EoFill ( )

Fills the path, using the even-odd rule to determine the region to fill.

◆ EoFillStroke()

void iTextSharp.text.pdf.PdfContentByte.EoFillStroke ( )

Fills the path, using the even-odd rule to determine the region to fill and strokes it.

◆ Fill()

void iTextSharp.text.pdf.PdfContentByte.Fill ( )

Fills the path, using the non-zero winding number rule to determine the region to fill.

◆ FillStroke()

void iTextSharp.text.pdf.PdfContentByte.FillStroke ( )

Fills the path using the non-zero winding number rule to determine the region to fill and strokes it.

◆ GetEffectiveStringWidth()

float iTextSharp.text.pdf.PdfContentByte.GetEffectiveStringWidth ( String  text,
bool  kerned 
)

Computes the width of the given string taking in account the current values of "Character spacing", "Word Spacing" and "Horizontal Scaling". The additional spacing is not computed for the last character of the string.

Parameters
textthe string to get width of
kernedthe kerning option
Returns
the width

◆ GetKernArray()

static PdfTextArray iTextSharp.text.pdf.PdfContentByte.GetKernArray ( String  text,
BaseFont  font 
)
static

Constructs a kern array for a text in a certain font

Parameters
textthe text
fontthe font
Returns
a PdfTextArray

◆ LineTo()

void iTextSharp.text.pdf.PdfContentByte.LineTo ( float  x,
float  y 
)

Appends a straight line segment from the current point (x, y). The new current point is (x, y).

Parameters
xnew x-coordinate
ynew y-coordinate

◆ LocalDestination()

bool iTextSharp.text.pdf.PdfContentByte.LocalDestination ( string  name,
PdfDestination  destination 
)

The local destination to where a local goto with the same name will jump.

Parameters
namethe name of this local destination
destinationthe PdfDestination with the jump coordinates
Returns
true if the local destination was added, false if a local destination with the same name already exists

◆ LocalGoto()

void iTextSharp.text.pdf.PdfContentByte.LocalGoto ( string  name,
float  llx,
float  lly,
float  urx,
float  ury 
)

Implements a link to other part of the document. The jump will be made to a local destination with the same name, that must exist.

Parameters
namethe name for this link
llxthe lower left x corner of the activation area
llythe lower left y corner of the activation area
urxthe upper right x corner of the activation area
urythe upper right y corner of the activation area

◆ MoveText()

void iTextSharp.text.pdf.PdfContentByte.MoveText ( float  x,
float  y 
)

Moves to the start of the next line, offset from the start of the current line.

Parameters
xx-coordinate of the new current point
yy-coordinate of the new current point

◆ MoveTextWithLeading()

void iTextSharp.text.pdf.PdfContentByte.MoveTextWithLeading ( float  x,
float  y 
)

Moves to the start of the next line, offset from the start of the current line.

As a side effect, this sets the leading parameter in the text state.

Parameters
xoffset of the new current point
yy-coordinate of the new current point

◆ MoveTo()

void iTextSharp.text.pdf.PdfContentByte.MoveTo ( float  x,
float  y 
)

Move the current point (x, y), omitting any connecting line segment.

Parameters
xnew x-coordinate
ynew y-coordinate

◆ NewlineShowText() [1/2]

void iTextSharp.text.pdf.PdfContentByte.NewlineShowText ( float  wordSpacing,
float  charSpacing,
string  text 
)

Moves to the next line and shows text string, using the given values of the character and word spacing parameters.

Parameters
wordSpacinga parameter
charSpacinga parameter
textthe text to write

◆ NewlineShowText() [2/2]

void iTextSharp.text.pdf.PdfContentByte.NewlineShowText ( string  text)

Moves to the next line and shows text.

Parameters
textthe text to write

◆ NewlineText()

void iTextSharp.text.pdf.PdfContentByte.NewlineText ( )

Moves to the start of the next line.

◆ NewPath()

void iTextSharp.text.pdf.PdfContentByte.NewPath ( )

Ends the path without filling or stroking it.

◆ PaintShading() [1/2]

virtual void iTextSharp.text.pdf.PdfContentByte.PaintShading ( PdfShading  shading)
virtual

Paints using a shading object.

Parameters
shadingthe shading object

◆ PaintShading() [2/2]

virtual void iTextSharp.text.pdf.PdfContentByte.PaintShading ( PdfShadingPattern  shading)
virtual

Paints using a shading pattern.

Parameters
shadingthe shading pattern

◆ Rectangle() [1/2]

void iTextSharp.text.pdf.PdfContentByte.Rectangle ( float  x,
float  y,
float  w,
float  h 
)

Adds a rectangle to the current path.

Parameters
xx-coordinate of the starting point
yy-coordinate of the starting point
wwidth
hheight

◆ Rectangle() [2/2]

void iTextSharp.text.pdf.PdfContentByte.Rectangle ( Rectangle  rectangle)

Adds a border (complete or partially) to the current path..

Parameters
rectanglea Rectangle

◆ RemoteGoto() [1/2]

void iTextSharp.text.pdf.PdfContentByte.RemoteGoto ( string  filename,
int  page,
float  llx,
float  lly,
float  urx,
float  ury 
)

Implements a link to another document.

Parameters
filenamethe filename for the remote document
pagethe page to jump to
llxthe lower left x corner of the activation area
llythe lower left y corner of the activation area
urxthe upper right x corner of the activation area
urythe upper right y corner of the activation area

◆ RemoteGoto() [2/2]

void iTextSharp.text.pdf.PdfContentByte.RemoteGoto ( string  filename,
string  name,
float  llx,
float  lly,
float  urx,
float  ury 
)

Implements a link to another document.

Parameters
filenamethe filename for the remote document
namethe name to jump to
llxthe lower left x corner of the activation area
llythe lower left y corner of the activation area
urxthe upper right x corner of the activation area
urythe upper right y corner of the activation area

◆ Reset() [1/2]

void iTextSharp.text.pdf.PdfContentByte.Reset ( )

Makes this PdfContentByte empty. Calls reset( true )

◆ Reset() [2/2]

void iTextSharp.text.pdf.PdfContentByte.Reset ( bool  validateContent)

Makes this PdfContentByte empty.

Parameters
validateContentwill call sanityCheck() if true.
Since
2.1.6

◆ ResetCMYKColorFill()

virtual void iTextSharp.text.pdf.PdfContentByte.ResetCMYKColorFill ( )
virtual

Changes the current color for filling paths to black.

Reimplemented in iTextSharp.text.pdf.PdfPatternPainter.

◆ ResetCMYKColorStroke()

virtual void iTextSharp.text.pdf.PdfContentByte.ResetCMYKColorStroke ( )
virtual

Changes the current color for stroking paths to black.

Reimplemented in iTextSharp.text.pdf.PdfPatternPainter.

◆ ResetGrayFill()

virtual void iTextSharp.text.pdf.PdfContentByte.ResetGrayFill ( )
virtual

Changes the current gray tint for filling paths to black.

Reimplemented in iTextSharp.text.pdf.PdfPatternPainter.

◆ ResetGrayStroke()

virtual void iTextSharp.text.pdf.PdfContentByte.ResetGrayStroke ( )
virtual

Changes the current gray tint for stroking paths to black.

Reimplemented in iTextSharp.text.pdf.PdfPatternPainter.

◆ ResetRGBColorFill()

virtual void iTextSharp.text.pdf.PdfContentByte.ResetRGBColorFill ( )
virtual

Changes the current color for filling paths to black.

Reimplemented in iTextSharp.text.pdf.PdfPatternPainter.

◆ ResetRGBColorStroke()

virtual void iTextSharp.text.pdf.PdfContentByte.ResetRGBColorStroke ( )
virtual

Changes the current color for stroking paths to black.

Reimplemented in iTextSharp.text.pdf.PdfPatternPainter.

◆ RestoreState()

void iTextSharp.text.pdf.PdfContentByte.RestoreState ( )

Restores the graphic state. saveState and restoreState must be balanced.

◆ RoundRectangle()

void iTextSharp.text.pdf.PdfContentByte.RoundRectangle ( float  x,
float  y,
float  w,
float  h,
float  r 
)

Adds a round rectangle to the current path.

Parameters
xx-coordinate of the starting point
yy-coordinate of the starting point
wwidth
hheight
rradius of the arc corner

◆ SanityCheck()

void iTextSharp.text.pdf.PdfContentByte.SanityCheck ( )

Checks for any dangling state: Mismatched save/restore state, begin/end text, begin/end layer, or begin/end marked content sequence. If found, this function will throw. This function is called automatically during a reset() (from Document.newPage() for example), and before writing itself out in toPdf(). One possible cause: not calling myPdfGraphics2D.dispose() will leave dangling saveState() calls.

Since
2.1.6
Exceptions
IllegalPdfSyntaxException(a runtime exception)

◆ SaveState()

void iTextSharp.text.pdf.PdfContentByte.SaveState ( )

Saves the graphic state. saveState and restoreState must be balanced.

◆ SetAction()

virtual void iTextSharp.text.pdf.PdfContentByte.SetAction ( PdfAction  action,
float  llx,
float  lly,
float  urx,
float  ury 
)
virtual

Implements an action in an area.

Parameters
actionthe PdfAction
llxthe lower left x corner of the activation area
llythe lower left y corner of the activation area
urxthe upper right x corner of the activation area
urythe upper right y corner of the activation area

Reimplemented in iTextSharp.text.pdf.StampContent.

◆ SetCharacterSpacing()

void iTextSharp.text.pdf.PdfContentByte.SetCharacterSpacing ( float  value)

Sets the character spacing parameter.

Parameters
charSpacea parameter

◆ SetCMYKColorFill()

virtual void iTextSharp.text.pdf.PdfContentByte.SetCMYKColorFill ( int  cyan,
int  magenta,
int  yellow,
int  black 
)
virtual

Changes the current color for filling paths (device dependent colors!).

Sets the color space to DeviceCMYK (or the DefaultCMYK color space), and sets the color to use for filling paths.

This method is described in the 'Portable Document Format Reference Manual version 1.3' section 8.5.2.1 (page 331).

Following the PDF manual, each operand must be a number between 0 (no ink) and 1 (maximum ink). This method however accepts only ints between 0x00 and 0xFF.

Parameters
cyanthe intensity of cyan
magentathe intensity of magenta
yellowthe intensity of yellow
blackthe intensity of black

Reimplemented in iTextSharp.text.pdf.PdfPatternPainter.

◆ SetCMYKColorFillF()

virtual void iTextSharp.text.pdf.PdfContentByte.SetCMYKColorFillF ( float  cyan,
float  magenta,
float  yellow,
float  black 
)
virtual

Changes the current color for filling paths (device dependent colors!).

Sets the color space to DeviceCMYK (or the DefaultCMYK color space), and sets the color to use for filling paths.

Following the PDF manual, each operand must be a number between 0 (no ink) and 1 (maximum ink).

Parameters
cyanthe intensity of cyan. A value between 0 and 1
magentathe intensity of magenta. A value between 0 and 1
yellowthe intensity of yellow. A value between 0 and 1
blackthe intensity of black. A value between 0 and 1

Reimplemented in iTextSharp.text.pdf.PdfPatternPainter.

◆ SetCMYKColorStroke()

virtual void iTextSharp.text.pdf.PdfContentByte.SetCMYKColorStroke ( int  cyan,
int  magenta,
int  yellow,
int  black 
)
virtual

Changes the current color for stroking paths (device dependent colors!).

Sets the color space to DeviceCMYK (or the DefaultCMYK color space), and sets the color to use for stroking paths.

This method is described in the 'Portable Document Format Reference Manual version 1.3' section 8.5.2.1 (page 331).

Following the PDF manual, each operand must be a number between 0 (miniumum intensity) and 1 (maximum intensity). This method however accepts only ints between 0x00 and 0xFF.

Parameters
cyanthe intensity of red
magentathe intensity of green
yellowthe intensity of blue
blackthe intensity of black

Reimplemented in iTextSharp.text.pdf.PdfPatternPainter.

◆ SetCMYKColorStrokeF()

virtual void iTextSharp.text.pdf.PdfContentByte.SetCMYKColorStrokeF ( float  cyan,
float  magenta,
float  yellow,
float  black 
)
virtual

Changes the current color for stroking paths (device dependent colors!).

Sets the color space to DeviceCMYK (or the DefaultCMYK color space), and sets the color to use for stroking paths.

Following the PDF manual, each operand must be a number between 0 (miniumum intensity) and 1 (maximum intensity).

Parameters
cyanthe intensity of cyan. A value between 0 and 1
magentathe intensity of magenta. A value between 0 and 1
yellowthe intensity of yellow. A value between 0 and 1
blackthe intensity of black. A value between 0 and 1

Reimplemented in iTextSharp.text.pdf.PdfPatternPainter.

◆ SetColorFill() [1/2]

virtual void iTextSharp.text.pdf.PdfContentByte.SetColorFill ( Color  value)
virtual

Sets the fill color. color can be an ExtendedColor.

Parameters
colorthe color

Reimplemented in iTextSharp.text.pdf.PdfPatternPainter.

◆ SetColorFill() [2/2]

virtual void iTextSharp.text.pdf.PdfContentByte.SetColorFill ( PdfSpotColor  sp,
float  tint 
)
virtual

Sets the fill color to a spot color.

Parameters
spthe spot color
tintthe tint for the spot color. 0 is no color and 1 is 100% color

Reimplemented in iTextSharp.text.pdf.PdfPatternPainter, and iTextSharp.text.pdf.PdfImportedPage.

◆ SetColorStroke() [1/2]

virtual void iTextSharp.text.pdf.PdfContentByte.SetColorStroke ( Color  value)
virtual

Sets the stroke color. color can be an ExtendedColor.

Parameters
colorthe color

Reimplemented in iTextSharp.text.pdf.PdfPatternPainter.

◆ SetColorStroke() [2/2]

virtual void iTextSharp.text.pdf.PdfContentByte.SetColorStroke ( PdfSpotColor  sp,
float  tint 
)
virtual

Sets the stroke color to a spot color.

Parameters
spthe spot color
tintthe tint for the spot color. 0 is no color and 1 is 100% color

Reimplemented in iTextSharp.text.pdf.PdfPatternPainter, and iTextSharp.text.pdf.PdfImportedPage.

◆ SetDefaultColorspace()

virtual void iTextSharp.text.pdf.PdfContentByte.SetDefaultColorspace ( PdfName  name,
PdfObject  obj 
)
virtual

Sets the default colorspace.

Parameters
namethe name of the colorspace. It can be PdfName.DEFAULTGRAY, PdfName.DEFAULTRGB or PdfName.DEFAULTCMYK
objthe colorspace. A null or PdfNull removes any colorspace with the same name

◆ SetFlatness()

void iTextSharp.text.pdf.PdfContentByte.SetFlatness ( float  value)

Changes the Flatness.

Flatness sets the maximum permitted distance in device pixels between the mathematically correct path and an approximation constructed from straight line segments.

Parameters
flatnessa value

◆ SetFontAndSize()

virtual void iTextSharp.text.pdf.PdfContentByte.SetFontAndSize ( BaseFont  bf,
float  size 
)
virtual

Set the font and the size for the subsequent text writing.

Parameters
bfthe font
sizethe font size in points

Reimplemented in iTextSharp.text.pdf.PdfImportedPage, and iTextSharp.text.pdf.PdfAppearance.

◆ SetGrayFill()

virtual void iTextSharp.text.pdf.PdfContentByte.SetGrayFill ( float  value)
virtual

Changes the currentgray tint for filling paths (device dependent colors!).

Sets the color space to DeviceGray (or the DefaultGray color space), and sets the gray tint to use for filling paths.

Parameters
graya value between 0 (black) and 1 (white)

Reimplemented in iTextSharp.text.pdf.PdfPatternPainter.

◆ SetGrayStroke()

virtual void iTextSharp.text.pdf.PdfContentByte.SetGrayStroke ( float  value)
virtual

Changes the currentgray tint for stroking paths (device dependent colors!).

Sets the color space to DeviceGray (or the DefaultGray color space), and sets the gray tint to use for stroking paths.

Parameters
graya value between 0 (black) and 1 (white)

Reimplemented in iTextSharp.text.pdf.PdfPatternPainter.

◆ SetGState()

void iTextSharp.text.pdf.PdfContentByte.SetGState ( PdfGState  gstate)

Sets the graphic state

Parameters
gstatethe graphic state

◆ SetHorizontalScaling()

void iTextSharp.text.pdf.PdfContentByte.SetHorizontalScaling ( float  value)

Sets the horizontal scaling parameter.

Parameters
scalea parameter

◆ SetLeading()

void iTextSharp.text.pdf.PdfContentByte.SetLeading ( float  v)

◆ SetLineCap()

void iTextSharp.text.pdf.PdfContentByte.SetLineCap ( int  value)

Changes the Line cap style.

The line cap style specifies the shape to be used at the end of open subpaths when they are stroked.
Allowed values are 0 (Butt end caps), 1 (Round end caps) and 2 (Projecting square end caps).

Parameters
stylea value

◆ SetLineDash() [1/4]

void iTextSharp.text.pdf.PdfContentByte.SetLineDash ( float  unitsOn,
float  phase 
)

Changes the value of the line dash pattern.

The line dash pattern controls the pattern of dashes and gaps used to stroke paths. It is specified by an array and a phase. The array specifies the length of the alternating dashes and gaps. The phase specifies the distance into the dash pattern to start the dash.

Parameters
phasethe value of the phase
unitsOnthe number of units that must be 'on' (equals the number of units that must be 'off').

◆ SetLineDash() [2/4]

void iTextSharp.text.pdf.PdfContentByte.SetLineDash ( float  unitsOn,
float  unitsOff,
float  phase 
)

Changes the value of the line dash pattern.

The line dash pattern controls the pattern of dashes and gaps used to stroke paths. It is specified by an array and a phase. The array specifies the length of the alternating dashes and gaps. The phase specifies the distance into the dash pattern to start the dash.

Parameters
phasethe value of the phase
unitsOnthe number of units that must be 'on'
unitsOffthe number of units that must be 'off'

◆ SetLineDash() [3/4]

void iTextSharp.text.pdf.PdfContentByte.SetLineDash ( float  value)

Changes the value of the line dash pattern.

The line dash pattern controls the pattern of dashes and gaps used to stroke paths. It is specified by an array and a phase. The array specifies the length of the alternating dashes and gaps. The phase specifies the distance into the dash pattern to start the dash.

Parameters
phasethe value of the phase

◆ SetLineDash() [4/4]

void iTextSharp.text.pdf.PdfContentByte.SetLineDash ( float[]  array,
float  phase 
)

Changes the value of the line dash pattern.

The line dash pattern controls the pattern of dashes and gaps used to stroke paths. It is specified by an array and a phase. The array specifies the length of the alternating dashes and gaps. The phase specifies the distance into the dash pattern to start the dash.

Parameters
arraylength of the alternating dashes and gaps
phasethe value of the phase

◆ SetLineJoin()

void iTextSharp.text.pdf.PdfContentByte.SetLineJoin ( int  value)

Changes the Line join style.

The line join style specifies the shape to be used at the corners of paths that are stroked.
Allowed values are 0 (Miter joins), 1 (Round joins) and 2 (Bevel joins).

Parameters
stylea value

◆ SetLineWidth()

void iTextSharp.text.pdf.PdfContentByte.SetLineWidth ( float  value)

Changes the line width.

The line width specifies the thickness of the line used to stroke a path and is measured in used space units.

Parameters
wa width

◆ SetLiteral() [1/3]

void iTextSharp.text.pdf.PdfContentByte.SetLiteral ( char  c)

Outputs a char directly to the content.

Parameters
cthe char

◆ SetLiteral() [2/3]

void iTextSharp.text.pdf.PdfContentByte.SetLiteral ( float  n)

Outputs a float directly to the content.

Parameters
nthe float

◆ SetLiteral() [3/3]

void iTextSharp.text.pdf.PdfContentByte.SetLiteral ( string  s)

Outputs a string directly to the content.

Parameters
sthe string

◆ SetMiterLimit()

void iTextSharp.text.pdf.PdfContentByte.SetMiterLimit ( float  value)

Changes the Miter limit.

When two line segments meet at a sharp angle and mitered joins have been specified as the line join style, it is possible for the miter to extend far beyond the thickness of the line stroking path. The miter limit imposes a maximum on the ratio of the miter length to the line witdh. When the limit is exceeded, the join is converted from a miter to a bevel.

Parameters
miterLimita miter limit

◆ SetPatternFill() [1/3]

virtual void iTextSharp.text.pdf.PdfContentByte.SetPatternFill ( PdfPatternPainter  p)
virtual

Sets the fill color to a pattern. The pattern can be colored or uncolored.

Parameters
pthe pattern

Reimplemented in iTextSharp.text.pdf.PdfPatternPainter.

◆ SetPatternFill() [2/3]

virtual void iTextSharp.text.pdf.PdfContentByte.SetPatternFill ( PdfPatternPainter  p,
Color  color 
)
virtual

Sets the fill color to an uncolored pattern.

Parameters
pthe pattern
colorthe color of the pattern

◆ SetPatternFill() [3/3]

virtual void iTextSharp.text.pdf.PdfContentByte.SetPatternFill ( PdfPatternPainter  p,
Color  color,
float  tint 
)
virtual

Sets the fill color to an uncolored pattern.

Parameters
pthe pattern
colorthe color of the pattern
tintthe tint if the color is a spot color, ignored otherwise

Reimplemented in iTextSharp.text.pdf.PdfPatternPainter.

◆ SetPatternStroke() [1/3]

virtual void iTextSharp.text.pdf.PdfContentByte.SetPatternStroke ( PdfPatternPainter  p)
virtual

Sets the stroke color to a pattern. The pattern can be colored or uncolored.

Parameters
pthe pattern

Reimplemented in iTextSharp.text.pdf.PdfPatternPainter.

◆ SetPatternStroke() [2/3]

virtual void iTextSharp.text.pdf.PdfContentByte.SetPatternStroke ( PdfPatternPainter  p,
Color  color 
)
virtual

Sets the stroke color to an uncolored pattern.

Parameters
pthe pattern
colorthe color of the pattern

◆ SetPatternStroke() [3/3]

virtual void iTextSharp.text.pdf.PdfContentByte.SetPatternStroke ( PdfPatternPainter  p,
Color  color,
float  tint 
)
virtual

Sets the stroke color to an uncolored pattern.

Parameters
pthe pattern
colorthe color of the pattern
tintthe tint if the color is a spot color, ignored otherwise

Reimplemented in iTextSharp.text.pdf.PdfPatternPainter.

◆ SetRGBColorFill()

virtual void iTextSharp.text.pdf.PdfContentByte.SetRGBColorFill ( int  red,
int  green,
int  blue 
)
virtual

Changes the current color for filling paths (device dependent colors!).

Sets the color space to DeviceRGB (or the DefaultRGB color space), and sets the color to use for filling paths.

This method is described in the 'Portable Document Format Reference Manual version 1.3' section 8.5.2.1 (page 331).

Following the PDF manual, each operand must be a number between 0 (miniumum intensity) and 1 (maximum intensity). This method however accepts only ints between 0x00 and 0xFF.

Parameters
redthe intensity of red
greenthe intensity of green
bluethe intensity of blue

Reimplemented in iTextSharp.text.pdf.PdfPatternPainter.

◆ SetRGBColorFillF()

virtual void iTextSharp.text.pdf.PdfContentByte.SetRGBColorFillF ( float  red,
float  green,
float  blue 
)
virtual

Changes the current color for filling paths (device dependent colors!).

Sets the color space to DeviceRGB (or the DefaultRGB color space), and sets the color to use for filling paths.

Following the PDF manual, each operand must be a number between 0 (minimum intensity) and 1 (maximum intensity).

Parameters
redthe intensity of red. A value between 0 and 1
greenthe intensity of green. A value between 0 and 1
bluethe intensity of blue. A value between 0 and 1

Reimplemented in iTextSharp.text.pdf.PdfPatternPainter.

◆ SetRGBColorStroke()

virtual void iTextSharp.text.pdf.PdfContentByte.SetRGBColorStroke ( int  red,
int  green,
int  blue 
)
virtual

Changes the current color for stroking paths (device dependent colors!).

Sets the color space to DeviceRGB (or the DefaultRGB color space), and sets the color to use for stroking paths.

This method is described in the 'Portable Document Format Reference Manual version 1.3' section 8.5.2.1 (page 331).

Following the PDF manual, each operand must be a number between 0 (miniumum intensity) and 1 (maximum intensity). This method however accepts only ints between 0x00 and 0xFF.

Parameters
redthe intensity of red
greenthe intensity of green
bluethe intensity of blue

Reimplemented in iTextSharp.text.pdf.PdfPatternPainter.

◆ SetRGBColorStrokeF()

virtual void iTextSharp.text.pdf.PdfContentByte.SetRGBColorStrokeF ( float  red,
float  green,
float  blue 
)
virtual

Changes the current color for stroking paths (device dependent colors!).

Sets the color space to DeviceRGB (or the DefaultRGB color space), and sets the color to use for stroking paths.

Following the PDF manual, each operand must be a number between 0 (miniumum intensity) and 1 (maximum intensity).

Parameters
redthe intensity of red. A value between 0 and 1
greenthe intensity of green. A value between 0 and 1
bluethe intensity of blue. A value between 0 and 1

Reimplemented in iTextSharp.text.pdf.PdfPatternPainter.

◆ SetShadingFill()

virtual void iTextSharp.text.pdf.PdfContentByte.SetShadingFill ( PdfShadingPattern  shading)
virtual

Sets the shading fill pattern.

Parameters
shadingthe shading pattern

◆ SetShadingStroke()

virtual void iTextSharp.text.pdf.PdfContentByte.SetShadingStroke ( PdfShadingPattern  shading)
virtual

Sets the shading stroke pattern

Parameters
shadingthe shading pattern

◆ SetTextMatrix() [1/2]

void iTextSharp.text.pdf.PdfContentByte.SetTextMatrix ( float  a,
float  b,
float  c,
float  d,
float  x,
float  y 
)

Changes the text matrix.

Remark: this operation also initializes the current point position.

Parameters
aoperand 1,1 in the matrix
boperand 1,2 in the matrix
coperand 2,1 in the matrix
doperand 2,2 in the matrix
xoperand 3,1 in the matrix
yoperand 3,2 in the matrix

◆ SetTextMatrix() [2/2]

void iTextSharp.text.pdf.PdfContentByte.SetTextMatrix ( float  x,
float  y 
)

Changes the text matrix. The first four parameters are {1,0,0,1}.

Remark: this operation also initializes the current point position.

Parameters
xoperand 3,1 in the matrix
yoperand 3,2 in the matrix

◆ SetTextRenderingMode()

void iTextSharp.text.pdf.PdfContentByte.SetTextRenderingMode ( int  value)

Sets the text rendering parameter.

Parameters
renderinga parameter

◆ SetTextRise()

void iTextSharp.text.pdf.PdfContentByte.SetTextRise ( float  value)

Sets the text rise parameter.

This allows to write text in subscript or basescript mode.

Parameters
risea parameter

◆ SetWordSpacing()

void iTextSharp.text.pdf.PdfContentByte.SetWordSpacing ( float  value)

Sets the word spacing parameter.

Parameters
wordSpacea parameter

◆ ShowText() [1/2]

void iTextSharp.text.pdf.PdfContentByte.ShowText ( PdfTextArray  text)

Show an array of text.

Parameters
textarray of text

◆ ShowText() [2/2]

void iTextSharp.text.pdf.PdfContentByte.ShowText ( string  text)

Shows the text.

Parameters
textthe text to write

◆ ShowTextAligned()

void iTextSharp.text.pdf.PdfContentByte.ShowTextAligned ( int  alignment,
String  text,
float  x,
float  y,
float  rotation 
)

Shows text right, left or center aligned with rotation.

Parameters
alignmentthe alignment can be ALIGN_CENTER, ALIGN_RIGHT or ALIGN_LEFT
textthe text to show
xthe x pivot position
ythe y pivot position
rotationthe rotation to be applied in degrees counterclockwise

◆ ShowTextAlignedKerned()

void iTextSharp.text.pdf.PdfContentByte.ShowTextAlignedKerned ( int  alignment,
String  text,
float  x,
float  y,
float  rotation 
)

Shows text kerned right, left or center aligned with rotation.

Parameters
alignmentthe alignment can be ALIGN_CENTER, ALIGN_RIGHT or ALIGN_LEFT
textthe text to show
xthe x pivot position
ythe y pivot position
rotationthe rotation to be applied in degrees counterclockwise

◆ ShowTextKerned()

void iTextSharp.text.pdf.PdfContentByte.ShowTextKerned ( String  text)

Shows the text kerned.

Parameters
textthe text to write

◆ Stroke()

void iTextSharp.text.pdf.PdfContentByte.Stroke ( )

Strokes the path.

◆ ToPdf()

byte [] iTextSharp.text.pdf.PdfContentByte.ToPdf ( PdfWriter  writer)

Returns the PDF representation of this PdfContentByte-object.

Parameters
writerthe PdfWriter
Returns
a byte array with the representation

◆ ToString()

override string iTextSharp.text.pdf.PdfContentByte.ToString ( )

Returns the string representation of this PdfContentByte-object.

Returns
a string

◆ Transform()

void iTextSharp.text.pdf.PdfContentByte.Transform ( System.Drawing.Drawing2D.Matrix  tx)

◆ VariableRectangle()

void iTextSharp.text.pdf.PdfContentByte.VariableRectangle ( Rectangle  rect)

Adds a variable width border to the current path. Only use if Rectangle.isUseVariableBorders = true.

Parameters
recta Rectangle

Member Data Documentation

◆ ALIGN_CENTER

const int iTextSharp.text.pdf.PdfContentByte.ALIGN_CENTER = Element.ALIGN_CENTER
static

The alignement is center

◆ ALIGN_LEFT

const int iTextSharp.text.pdf.PdfContentByte.ALIGN_LEFT = Element.ALIGN_LEFT
static

The alignement is left

◆ ALIGN_RIGHT

const int iTextSharp.text.pdf.PdfContentByte.ALIGN_RIGHT = Element.ALIGN_RIGHT
static

The alignement is right

◆ content

ByteBuffer iTextSharp.text.pdf.PdfContentByte.content = new ByteBuffer()
protected

This is the actual content

◆ layerDepth

ArrayList iTextSharp.text.pdf.PdfContentByte.layerDepth
protected

The list were we save/restore the layer depth

◆ LINE_CAP_BUTT

const int iTextSharp.text.pdf.PdfContentByte.LINE_CAP_BUTT = 0
static

A possible line cap value

◆ LINE_CAP_PROJECTING_SQUARE

const int iTextSharp.text.pdf.PdfContentByte.LINE_CAP_PROJECTING_SQUARE = 2
static

A possible line cap value

◆ LINE_CAP_ROUND

const int iTextSharp.text.pdf.PdfContentByte.LINE_CAP_ROUND = 1
static

A possible line cap value

◆ LINE_JOIN_BEVEL

const int iTextSharp.text.pdf.PdfContentByte.LINE_JOIN_BEVEL = 2
static

A possible line join value

◆ LINE_JOIN_MITER

const int iTextSharp.text.pdf.PdfContentByte.LINE_JOIN_MITER = 0
static

A possible line join value

◆ LINE_JOIN_ROUND

const int iTextSharp.text.pdf.PdfContentByte.LINE_JOIN_ROUND = 1
static

A possible line join value

◆ pdf

PdfDocument iTextSharp.text.pdf.PdfContentByte.pdf
protected

This is the PdfDocument

◆ separator

int iTextSharp.text.pdf.PdfContentByte.separator = '\n'
protected

The separator between commands.

◆ state

GraphicState iTextSharp.text.pdf.PdfContentByte.state = new GraphicState()
protected

This is the GraphicState in use

◆ stateList

ArrayList iTextSharp.text.pdf.PdfContentByte.stateList = new ArrayList()
protected

The list were we save/restore the state

◆ TEXT_RENDER_MODE_CLIP

const int iTextSharp.text.pdf.PdfContentByte.TEXT_RENDER_MODE_CLIP = 7
static

A possible text rendering value

◆ TEXT_RENDER_MODE_FILL

const int iTextSharp.text.pdf.PdfContentByte.TEXT_RENDER_MODE_FILL = 0
static

A possible text rendering value

◆ TEXT_RENDER_MODE_FILL_CLIP

const int iTextSharp.text.pdf.PdfContentByte.TEXT_RENDER_MODE_FILL_CLIP = 4
static

A possible text rendering value

◆ TEXT_RENDER_MODE_FILL_STROKE

const int iTextSharp.text.pdf.PdfContentByte.TEXT_RENDER_MODE_FILL_STROKE = 2
static

A possible text rendering value

◆ TEXT_RENDER_MODE_FILL_STROKE_CLIP

const int iTextSharp.text.pdf.PdfContentByte.TEXT_RENDER_MODE_FILL_STROKE_CLIP = 6
static

A possible text rendering value

◆ TEXT_RENDER_MODE_INVISIBLE

const int iTextSharp.text.pdf.PdfContentByte.TEXT_RENDER_MODE_INVISIBLE = 3
static

A possible text rendering value

◆ TEXT_RENDER_MODE_STROKE

const int iTextSharp.text.pdf.PdfContentByte.TEXT_RENDER_MODE_STROKE = 1
static

A possible text rendering value

◆ TEXT_RENDER_MODE_STROKE_CLIP

const int iTextSharp.text.pdf.PdfContentByte.TEXT_RENDER_MODE_STROKE_CLIP = 5
static

A possible text rendering value

◆ writer

PdfWriter iTextSharp.text.pdf.PdfContentByte.writer
protected

This is the writer

Property Documentation

◆ CharacterSpacing

float iTextSharp.text.pdf.PdfContentByte.CharacterSpacing
get

Gets the current character spacing.

Returns
the current character spacing

◆ Duplicate

virtual PdfContentByte iTextSharp.text.pdf.PdfContentByte.Duplicate
get

Gets a duplicate of this PdfContentByte. All the members are copied by reference but the buffer stays different.

Returns
a copy of this PdfContentByte

◆ HorizontalScaling

float iTextSharp.text.pdf.PdfContentByte.HorizontalScaling
get

Gets the current character spacing.

Returns
the current character spacing

◆ InternalBuffer

ByteBuffer iTextSharp.text.pdf.PdfContentByte.InternalBuffer
get

Gets the internal buffer.

Returns
the internal buffer

◆ Leading

float iTextSharp.text.pdf.PdfContentByte.Leading
get

Gets the current text leading.

Returns
the current text leading

◆ PdfDocument

PdfDocument iTextSharp.text.pdf.PdfContentByte.PdfDocument
get

Gets the PdfDocument in use by this object.

Returns
the PdfDocument in use by this object

◆ PdfWriter

PdfWriter iTextSharp.text.pdf.PdfContentByte.PdfWriter
get

Gets the PdfWriter in use by this object.

Returns
the PdfWriter in use by this object

◆ RootOutline

PdfOutline iTextSharp.text.pdf.PdfContentByte.RootOutline
get

Gets the root outline.

Returns
the root outline

◆ WordSpacing

float iTextSharp.text.pdf.PdfContentByte.WordSpacing
get

Gets the current word spacing.

Returns
the current word spacing

◆ XTLM

float iTextSharp.text.pdf.PdfContentByte.XTLM
get

Gets the x position of the text line matrix.

Returns
the x position of the text line matrix

◆ YTLM

float iTextSharp.text.pdf.PdfContentByte.YTLM
get

Gets the y position of the text line matrix.

Returns
the y position of the text line matrix

The documentation for this class was generated from the following file: