Save This Page
Home » iText-src-2.1.3 » com.lowagie » text » pdf » [javadoc | source]
com.lowagie.text.pdf
public class: PdfContentByte [javadoc | source]
java.lang.Object
   com.lowagie.text.pdf.PdfContentByte

Direct Known Subclasses:
    PdfTemplate, PdfPatternPainter, StampContent, PdfPSXObject, Graphic, PdfImportedPage, StampContent, Type3Glyph, PdfAppearance

PdfContentByte is an object containing the user positioned text and graphic contents of a page. It knows how to apply the proper font encoding.
Nested Class Summary:
static class  PdfContentByte.GraphicState  This class keeps the graphic state of the current page 
Field Summary
public static final  int ALIGN_CENTER    The alignment is center 
public static final  int ALIGN_LEFT    The alignment is left 
public static final  int ALIGN_RIGHT    The alignment is right 
public static final  int LINE_CAP_BUTT    A possible line cap value 
public static final  int LINE_CAP_ROUND    A possible line cap value 
public static final  int LINE_CAP_PROJECTING_SQUARE    A possible line cap value 
public static final  int LINE_JOIN_MITER    A possible line join value 
public static final  int LINE_JOIN_ROUND    A possible line join value 
public static final  int LINE_JOIN_BEVEL    A possible line join value 
public static final  int TEXT_RENDER_MODE_FILL    A possible text rendering value 
public static final  int TEXT_RENDER_MODE_STROKE    A possible text rendering value 
public static final  int TEXT_RENDER_MODE_FILL_STROKE    A possible text rendering value 
public static final  int TEXT_RENDER_MODE_INVISIBLE    A possible text rendering value 
public static final  int TEXT_RENDER_MODE_FILL_CLIP    A possible text rendering value 
public static final  int TEXT_RENDER_MODE_STROKE_CLIP    A possible text rendering value 
public static final  int TEXT_RENDER_MODE_FILL_STROKE_CLIP    A possible text rendering value 
public static final  int TEXT_RENDER_MODE_CLIP    A possible text rendering value 
protected  ByteBuffer content    This is the actual content 
protected  PdfWriter writer    This is the writer 
protected  PdfDocument pdf    This is the PdfDocument 
protected  PdfContentByte.GraphicState state    This is the GraphicState in use 
protected  ArrayList stateList    The list were we save/restore the state 
protected  ArrayList layerDepth    The list were we save/restore the layer depth 
protected  int separator    The separator between commands. 
Constructor:
 public PdfContentByte(PdfWriter wr) 
    Constructs a new PdfContentByte-object.
    Parameters:
    wr - the writer associated to this content
Method from com.lowagie.text.pdf.PdfContentByte Summary:
add,   addAnnotation,   addImage,   addImage,   addImage,   addImage,   addOutline,   addPSXObject,   addTemplate,   addTemplate,   addTemplateReference,   arc,   beginLayer,   beginMarkedContentSequence,   beginMarkedContentSequence,   beginMarkedContentSequence,   beginText,   bezierArc,   checkNoPattern,   checkWriter,   circle,   clip,   closePath,   closePathEoFillStroke,   closePathFillStroke,   closePathStroke,   concatCTM,   createAppearance,   createAppearance,   createGraphics,   createGraphics,   createGraphics,   createGraphics,   createGraphicsShapes,   createGraphicsShapes,   createPattern,   createPattern,   createPattern,   createPattern,   createPrinterGraphics,   createPrinterGraphics,   createPrinterGraphics,   createPrinterGraphics,   createPrinterGraphicsShapes,   createPrinterGraphicsShapes,   createTemplate,   createTemplate,   curveFromTo,   curveTo,   curveTo,   drawButton,   drawRadioField,   drawTextField,   ellipse,   endLayer,   endMarkedContentSequence,   endText,   eoClip,   eoFill,   eoFillStroke,   escapeString,   escapeString,   fill,   fillStroke,   getCharacterSpacing,   getDuplicate,   getEffectiveStringWidth,   getHorizontalScaling,   getInternalBuffer,   getKernArray,   getLeading,   getPageResources,   getPdfDocument,   getPdfWriter,   getRootOutline,   getWordSpacing,   getXTLM,   getYTLM,   lineTo,   localDestination,   localGoto,   moveText,   moveTextWithLeading,   moveTo,   newPath,   newlineShowText,   newlineShowText,   newlineText,   outputColorNumbers,   paintShading,   paintShading,   rectangle,   rectangle,   remoteGoto,   remoteGoto,   reset,   resetCMYKColorFill,   resetCMYKColorStroke,   resetGrayFill,   resetGrayStroke,   resetRGBColorFill,   resetRGBColorStroke,   restoreState,   roundRectangle,   saveState,   setAction,   setCMYKColorFill,   setCMYKColorFillF,   setCMYKColorStroke,   setCMYKColorStrokeF,   setCharacterSpacing,   setColorFill,   setColorFill,   setColorStroke,   setColorStroke,   setDefaultColorspace,   setFlatness,   setFontAndSize,   setGState,   setGrayFill,   setGrayStroke,   setHorizontalScaling,   setLeading,   setLineCap,   setLineDash,   setLineDash,   setLineDash,   setLineDash,   setLineJoin,   setLineWidth,   setLiteral,   setLiteral,   setLiteral,   setMiterLimit,   setPatternFill,   setPatternFill,   setPatternFill,   setPatternStroke,   setPatternStroke,   setPatternStroke,   setRGBColorFill,   setRGBColorFillF,   setRGBColorStroke,   setRGBColorStrokeF,   setShadingFill,   setShadingStroke,   setTextMatrix,   setTextMatrix,   setTextRenderingMode,   setTextRise,   setWordSpacing,   showText,   showText,   showTextAligned,   showTextAlignedKerned,   showTextKerned,   size,   stroke,   toPdf,   toString,   transform,   variableRectangle
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.lowagie.text.pdf.PdfContentByte Detail:
 public  void add(PdfContentByte other) 
    Adds the content of another PdfContent-object to this object.
  void addAnnotation(PdfAnnotation annot) 
 public  void addImage(Image image) throws DocumentException 
    Adds an Image to the page. The Image must have absolute positioning.
 public  void addImage(Image image,
    boolean inlineImage) throws DocumentException 
    Adds an Image to the page. The Image must have absolute positioning. The image can be placed inline.
 public  void addImage(Image image,
    float a,
    float b,
    float c,
    float d,
    float e,
    float f) throws DocumentException 
    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).
 public  void addImage(Image image,
    float a,
    float b,
    float c,
    float d,
    float e,
    float f,
    boolean inlineImage) throws DocumentException 
    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.
 public  void addOutline(PdfOutline outline,
    String name) 
    Adds a named outline to the document.
 public  void addPSXObject(PdfPSXObject psobject) 
    Adds a PostScript XObject to this content.
 public  void addTemplate(PdfTemplate template,
    float x,
    float y) 
    Adds a template to this content.
 public  void addTemplate(PdfTemplate template,
    float a,
    float b,
    float c,
    float d,
    float e,
    float f) 
    Adds a template to this content.
  void addTemplateReference(PdfIndirectReference template,
    PdfName name,
    float a,
    float b,
    float c,
    float d,
    float e,
    float f) 
 public  void 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.
 public  void beginLayer(PdfOCG layer) 
    Begins a graphic block whose visibility is controlled 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.

 public  void 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.
 public  void beginMarkedContentSequence(PdfName tag) 
    This is just a shorthand to beginMarkedContentSequence(tag, null, false).
 public  void beginMarkedContentSequence(PdfName tag,
    PdfDictionary property,
    boolean inline) 
    Begins a marked content sequence. If property is null the mark will be of the type BMC otherwise it will be BDC.
 public  void beginText() 
    Starts the writing of text.
 public static ArrayList bezierArc(float x1,
    float y1,
    float x2,
    float y2,
    float startAng,
    float extent) 
    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.org), an excellent PDF generator for Python (BSD license: http://www.reportlab.org/devfaq.html#1.3 ).

  void checkNoPattern(PdfTemplate t) 
    Throws an error if it is a pattern.
 protected  void checkWriter() 
    Check if we have a valid PdfWriter.
 public  void circle(float x,
    float y,
    float r) 
    Draws a circle. The endpoint will (x+r, y).
 public  void 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.
 public  void closePath() 
    Closes the current subpath by appending a straight line segment from the current point to the starting point of the subpath.
 public  void closePathEoFillStroke() 
    Closes the path, fills it using the even-odd rule to determine the region to fill and strokes it.
 public  void closePathFillStroke() 
    Closes the path, fills it using the non-zero winding number rule to determine the region to fill and strokes it.
 public  void closePathStroke() 
    Closes the path and strokes it.
 public  void concatCTM(float a,
    float b,
    float c,
    float d,
    float e,
    float f) 
    Concatenate a matrix to the current transformation matrix.
 public PdfAppearance createAppearance(float width,
    float height) 
    Creates a new appearance to be used with form fields.
 PdfAppearance createAppearance(float width,
    float height,
    PdfName forcedName) 
 public Graphics2D createGraphics(float width,
    float height) 
    Gets a Graphics2D to write on. The graphics are translated to PDF commands.
 public Graphics2D createGraphics(float width,
    float height,
    FontMapper fontMapper) 
    Gets a Graphics2D to write on. The graphics are translated to PDF commands.
 public Graphics2D createGraphics(float width,
    float height,
    boolean convertImagesToJPEG,
    float quality) 
    Gets a Graphics2D to write on. The graphics are translated to PDF commands.
 public Graphics2D createGraphics(float width,
    float height,
    FontMapper fontMapper,
    boolean convertImagesToJPEG,
    float quality) 
    Gets a Graphics2D to write on. The graphics are translated to PDF commands.
 public Graphics2D createGraphicsShapes(float width,
    float height) 
    Gets a Graphics2D to write on. The graphics are translated to PDF commands as shapes. No PDF fonts will appear.
 public Graphics2D createGraphicsShapes(float width,
    float height,
    boolean convertImagesToJPEG,
    float quality) 
    Gets a Graphics2D to print on. The graphics are translated to PDF commands.
 public PdfPatternPainter 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.
 public PdfPatternPainter 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.
 public PdfPatternPainter createPattern(float width,
    float height,
    float xstep,
    float ystep) 
    Create a new colored tiling pattern.
 public PdfPatternPainter createPattern(float width,
    float height,
    float xstep,
    float ystep,
    Color color) 
    Create a new uncolored tiling pattern.
 public Graphics2D createPrinterGraphics(float width,
    float height,
    PrinterJob printerJob) 
    Gets a Graphics2D to print on. The graphics are translated to PDF commands.
 public Graphics2D createPrinterGraphics(float width,
    float height,
    FontMapper fontMapper,
    PrinterJob printerJob) 
    Gets a Graphics2D to print on. The graphics are translated to PDF commands.
 public Graphics2D createPrinterGraphics(float width,
    float height,
    boolean convertImagesToJPEG,
    float quality,
    PrinterJob printerJob) 
    Gets a Graphics2D to print on. The graphics are translated to PDF commands.
 public Graphics2D createPrinterGraphics(float width,
    float height,
    FontMapper fontMapper,
    boolean convertImagesToJPEG,
    float quality,
    PrinterJob printerJob) 
    Gets a Graphics2D to print on. The graphics are translated to PDF commands.
 public Graphics2D createPrinterGraphicsShapes(float width,
    float height,
    PrinterJob printerJob) 
    Gets a Graphics2D to print on. The graphics are translated to PDF commands as shapes. No PDF fonts will appear.
 public Graphics2D createPrinterGraphicsShapes(float width,
    float height,
    boolean convertImagesToJPEG,
    float quality,
    PrinterJob printerJob) 
    Gets a Graphics2D to print on. The graphics are translated to PDF commands.
 public PdfTemplate 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.

 PdfTemplate createTemplate(float width,
    float height,
    PdfName forcedName) 
 public  void curveFromTo(float x1,
    float y1,
    float x3,
    float y3) 
    Appends a Bêzier curve to the path, starting from the current point.
 public  void curveTo(float x2,
    float y2,
    float x3,
    float y3) 
    Appends a Bêzier curve to the path, starting from the current point.
 public  void 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.
 public  void drawButton(float llx,
    float lly,
    float urx,
    float ury,
    String text,
    BaseFont bf,
    float size) 
    Draws a button.
 public  void drawRadioField(float llx,
    float lly,
    float urx,
    float ury,
    boolean on) 
    Draws a TextField.
 public  void drawTextField(float llx,
    float lly,
    float urx,
    float ury) 
    Draws a TextField.
 public  void ellipse(float x1,
    float y1,
    float x2,
    float y2) 
    Draws an ellipse inscribed within the rectangle x1,y1,x2,y2.
 public  void endLayer() 
    Ends a layer controlled graphic block. It will end the most recent open block.
 public  void endMarkedContentSequence() 
    Ends a marked content sequence
 public  void endText() 
    Ends the writing of text and makes the current font invalid.
 public  void 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.
 public  void eoFill() 
    Fills the path, using the even-odd rule to determine the region to fill.
 public  void eoFillStroke() 
    Fills the path, using the even-odd rule to determine the region to fill and strokes it.
 static byte[] escapeString(byte[] b) 
    Escapes a byte array according to the PDF conventions.
 static  void escapeString(byte[] b,
    ByteBuffer content) 
    Escapes a byte array according to the PDF conventions.
 public  void fill() 
    Fills the path, using the non-zero winding number rule to determine the region to fill.
 public  void fillStroke() 
    Fills the path using the non-zero winding number rule to determine the region to fill and strokes it.
 public float getCharacterSpacing() 
    Gets the current character spacing.
 public PdfContentByte getDuplicate() 
    Gets a duplicate of this PdfContentByte. All the members are copied by reference but the buffer stays different.
 public float getEffectiveStringWidth(String text,
    boolean 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.
 public float getHorizontalScaling() 
    Gets the current character spacing.
 public ByteBuffer getInternalBuffer() 
    Gets the internal buffer.
 public static PdfTextArray getKernArray(String text,
    BaseFont font) 
    Constructs a kern array for a text in a certain font
 public float getLeading() 
    Gets the current text leading.
 PageResources getPageResources() 
 public PdfDocument getPdfDocument() 
    Gets the PdfDocument in use by this object.
 public PdfWriter getPdfWriter() 
    Gets the PdfWriter in use by this object.
 public PdfOutline getRootOutline() 
    Gets the root outline.
 public float getWordSpacing() 
    Gets the current word spacing.
 public float getXTLM() 
    Gets the x position of the text line matrix.
 public float getYTLM() 
    Gets the y position of the text line matrix.
 public  void lineTo(float x,
    float y) 
    Appends a straight line segment from the current point (x, y). The new current point is (x, y).
 public boolean localDestination(String name,
    PdfDestination destination) 
    The local destination to where a local goto with the same name will jump.
 public  void 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.
 public  void moveText(float x,
    float y) 
    Moves to the start of the next line, offset from the start of the current line.
 public  void 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.

 public  void moveTo(float x,
    float y) 
    Move the current point (x, y), omitting any connecting line segment.
 public  void newPath() 
    Ends the path without filling or stroking it.
 public  void newlineShowText(String text) 
    Moves to the next line and shows text.
 public  void 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.
 public  void newlineText() 
    Moves to the start of the next line.
  void outputColorNumbers(Color color,
    float tint) 
    Outputs the color values to the content.
 public  void paintShading(PdfShading shading) 
    Paints using a shading object.
 public  void paintShading(PdfShadingPattern shading) 
    Paints using a shading pattern.
 public  void rectangle(Rectangle rectangle) 
    Adds a border (complete or partially) to the current path..
 public  void rectangle(float x,
    float y,
    float w,
    float h) 
    Adds a rectangle to the current path.
 public  void remoteGoto(String filename,
    String name,
    float llx,
    float lly,
    float urx,
    float ury) 
    Implements a link to another document.
 public  void remoteGoto(String filename,
    int page,
    float llx,
    float lly,
    float urx,
    float ury) 
    Implements a link to another document.
 public  void reset() 
    Makes this PdfContentByte empty.
 public  void resetCMYKColorFill() 
    Changes the current color for filling paths to black.
 public  void resetCMYKColorStroke() 
    Changes the current color for stroking paths to black.
 public  void resetGrayFill() 
    Changes the current gray tint for filling paths to black.
 public  void resetGrayStroke() 
    Changes the current gray tint for stroking paths to black.
 public  void resetRGBColorFill() 
    Changes the current color for filling paths to black.
 public  void resetRGBColorStroke() 
    Changes the current color for stroking paths to black.
 public  void restoreState() 
    Restores the graphic state. saveState and restoreState must be balanced.
 public  void roundRectangle(float x,
    float y,
    float w,
    float h,
    float r) 
    Adds a round rectangle to the current path.
 public  void saveState() 
    Saves the graphic state. saveState and restoreState must be balanced.
 public  void setAction(PdfAction action,
    float llx,
    float lly,
    float urx,
    float ury) 
    Implements an action in an area.
 public  void setCMYKColorFill(int cyan,
    int magenta,
    int yellow,
    int black) 
    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 integers between 0x00 and 0xFF.

 public  void setCMYKColorFillF(float cyan,
    float magenta,
    float yellow,
    float black) 
    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).

 public  void setCMYKColorStroke(int cyan,
    int magenta,
    int yellow,
    int black) 
    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 (minimum intensity) and 1 (maximum intensity). This method however accepts only integers between 0x00 and 0xFF.
 public  void setCMYKColorStrokeF(float cyan,
    float magenta,
    float yellow,
    float black) 
    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).

 public  void setCharacterSpacing(float charSpace) 
    Sets the character spacing parameter.
 public  void setColorFill(Color color) 
    Sets the fill color. color can be an ExtendedColor.
 public  void setColorFill(PdfSpotColor sp,
    float tint) 
    Sets the fill color to a spot color.
 public  void setColorStroke(Color color) 
    Sets the stroke color. color can be an ExtendedColor.
 public  void setColorStroke(PdfSpotColor sp,
    float tint) 
    Sets the stroke color to a spot color.
 public  void setDefaultColorspace(PdfName name,
    PdfObject obj) 
    Sets the default colorspace.
 public  void setFlatness(float flatness) 
    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.

 public  void setFontAndSize(BaseFont bf,
    float size) 
    Set the font and the size for the subsequent text writing.
 public  void setGState(PdfGState gstate) 
    Sets the graphic state
 public  void setGrayFill(float gray) 
    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.

 public  void setGrayStroke(float gray) 
    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.

 public  void setHorizontalScaling(float scale) 
    Sets the horizontal scaling parameter.
 public  void setLeading(float leading) 
    Sets the text leading parameter.

    The leading parameter is measured in text space units. It specifies the vertical distance between the baselines of adjacent lines of text.

 public  void setLineCap(int style) 
    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 LINE_CAP_BUTT, LINE_CAP_ROUND and LINE_CAP_PROJECTING_SQUARE.

 public  void setLineDash(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.

 public  void 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.

 public final  void 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.

 public  void 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.

 public  void setLineJoin(int style) 
    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 LINE_JOIN_MITER (Miter joins), LINE_JOIN_ROUND (Round joins) and LINE_JOIN_BEVEL (Bevel joins).

 public  void setLineWidth(float w) 
    Changes the line width.

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

 public  void setLiteral(String s) 
    Outputs a String directly to the content.
 public  void setLiteral(char c) 
    Outputs a char directly to the content.
 public  void setLiteral(float n) 
    Outputs a float directly to the content.
 public  void setMiterLimit(float miterLimit) 
    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.

 public  void setPatternFill(PdfPatternPainter p) 
    Sets the fill color to a pattern. The pattern can be colored or uncolored.
 public  void setPatternFill(PdfPatternPainter p,
    Color color) 
    Sets the fill color to an uncolored pattern.
 public  void setPatternFill(PdfPatternPainter p,
    Color color,
    float tint) 
    Sets the fill color to an uncolored pattern.
 public  void setPatternStroke(PdfPatternPainter p) 
    Sets the stroke color to a pattern. The pattern can be colored or uncolored.
 public  void setPatternStroke(PdfPatternPainter p,
    Color color) 
    Sets the stroke color to an uncolored pattern.
 public  void setPatternStroke(PdfPatternPainter p,
    Color color,
    float tint) 
    Sets the stroke color to an uncolored pattern.
 public  void setRGBColorFill(int red,
    int green,
    int blue) 
    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 (minimum intensity) and 1 (maximum intensity). This method however accepts only integers between 0x00 and 0xFF.

 public  void setRGBColorFillF(float red,
    float green,
    float blue) 
    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).

 public  void setRGBColorStroke(int red,
    int green,
    int blue) 
    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 (minimum intensity) and 1 (maximum intensity). This method however accepts only integers between 0x00 and 0xFF.
 public  void setRGBColorStrokeF(float red,
    float green,
    float blue) 
    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).

 public  void setShadingFill(PdfShadingPattern shading) 
    Sets the shading fill pattern.
 public  void setShadingStroke(PdfShadingPattern shading) 
    Sets the shading stroke pattern
 public  void 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.

 public  void 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.

 public  void setTextRenderingMode(int rendering) 
    Sets the text rendering parameter.
 public  void setTextRise(float rise) 
    Sets the text rise parameter.

    This allows to write text in subscript or superscript mode.

 public  void setWordSpacing(float wordSpace) 
    Sets the word spacing parameter.
 public  void showText(String text) 
    Shows the text.
 public  void showText(PdfTextArray text) 
    Show an array of text.
 public  void showTextAligned(int alignment,
    String text,
    float x,
    float y,
    float rotation) 
    Shows text right, left or center aligned with rotation.
 public  void showTextAlignedKerned(int alignment,
    String text,
    float x,
    float y,
    float rotation) 
    Shows text kerned right, left or center aligned with rotation.
 public  void showTextKerned(String text) 
    Shows the text kerned.
 int size() 
    Gets the size of this content.
 public  void stroke() 
    Strokes the path.
 public byte[] toPdf(PdfWriter writer) 
    Returns the PDF representation of this PdfContentByte-object.
 public String toString() 
    Returns the String representation of this PdfContentByte-object.
 public  void transform(AffineTransform af) 
    Concatenates a transformation to the current transformation matrix.
 public  void variableRectangle(Rectangle rect)