Java Doc for PdfContentByte.java in  » PDF » pdf-itext » com » lowagie » text » pdf » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » PDF » pdf itext » com.lowagie.text.pdf 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.lowagie.text.pdf.PdfContentByte

All known Subclasses:   com.lowagie.text.pdf.PdfTemplate,  com.lowagie.text.pdf.Type3Glyph,  com.lowagie.text.pdf.StampContent,
PdfContentByte
public class PdfContentByte (Code)
PdfContentByte is an object containing the user positioned text and graphic contents of a page. It knows how to apply the proper font encoding.

Inner Class :static class GraphicState

Field Summary
final public static  intALIGN_CENTER
    
final public static  intALIGN_LEFT
    
final public static  intALIGN_RIGHT
    
final public static  intLINE_CAP_BUTT
    
final public static  intLINE_CAP_PROJECTING_SQUARE
    
final public static  intLINE_CAP_ROUND
    
final public static  intLINE_JOIN_BEVEL
    
final public static  intLINE_JOIN_MITER
    
final public static  intLINE_JOIN_ROUND
    
final public static  intTEXT_RENDER_MODE_CLIP
    
final public static  intTEXT_RENDER_MODE_FILL
    
final public static  intTEXT_RENDER_MODE_FILL_CLIP
    
final public static  intTEXT_RENDER_MODE_FILL_STROKE
    
final public static  intTEXT_RENDER_MODE_FILL_STROKE_CLIP
    
final public static  intTEXT_RENDER_MODE_INVISIBLE
    
final public static  intTEXT_RENDER_MODE_STROKE
    
final public static  intTEXT_RENDER_MODE_STROKE_CLIP
    
protected  ByteBuffercontent
    
protected  ArrayListlayerDepth
    
protected  PdfDocumentpdf
    
protected  intseparator
     The separator between commands.
protected  GraphicStatestate
    
protected  ArrayListstateList
    
protected  PdfWriterwriter
    

Constructor Summary
public  PdfContentByte(PdfWriter wr)
     Constructs a new PdfContentByte-object.

Method Summary
public  voidadd(PdfContentByte other)
     Adds the content of another PdfContent-object to this object.
 voidaddAnnotation(PdfAnnotation annot)
    
public  voidaddImage(Image image)
     Adds an Image to the page.
public  voidaddImage(Image image, boolean inlineImage)
     Adds an Image to the page.
public  voidaddImage(Image image, float a, float b, float c, float d, float e, float f)
     Adds an Image to the page.
public  voidaddImage(Image image, float a, float b, float c, float d, float e, float f, boolean inlineImage)
     Adds an Image to the page.
public  voidaddOutline(PdfOutline outline)
     Adds an outline to the document.
public  voidaddOutline(PdfOutline outline, String name)
     Adds a named outline to the document.
public  voidaddPSXObject(PdfPSXObject psobject)
     Adds a PostScript XObject to this content.
public  voidaddTemplate(PdfTemplate template, float a, float b, float c, float d, float e, float f)
     Adds a template to this content.
public  voidaddTemplate(PdfTemplate template, float x, float y)
     Adds a template to this content.
 voidaddTemplateReference(PdfIndirectReference template, PdfName name, float a, float b, float c, float d, float e, float f)
    
public  voidarc(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.
public  voidbeginLayer(PdfOCG layer)
     Begins a graphic block whose visibility is controled by the layer. Blocks can be nested.
public  voidbeginMarkedContentSequence(PdfStructureElement struc)
     Begins a marked content sequence.
public  voidbeginMarkedContentSequence(PdfName tag, PdfDictionary property, boolean inline)
     Begins a marked content sequence.
public  voidbeginMarkedContentSequence(PdfName tag)
     This is just a shorthand to beginMarkedContentSequence(tag, null, false).
public  voidbeginText()
     Starts the writing of text.
public static  ArrayListbezierArc(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.

 voidcheckNoPattern(PdfTemplate t)
     Throws an error if it is a pattern.
protected  voidcheckWriter()
     Check if we have a valid PdfWriter.
public  voidcircle(float x, float y, float r)
     Draws a circle.
public  voidclip()
     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  voidclosePath()
     Closes the current subpath by appending a straight line segment from the current point to the starting point of the subpath.
public  voidclosePathEoFillStroke()
     Closes the path, fills it using the even-odd rule to determine the region to fill and strokes it.
public  voidclosePathFillStroke()
     Closes the path, fills it using the non-zero winding number rule to determine the region to fill and strokes it.
public  voidclosePathStroke()
     Closes the path and strokes it.
public  voidconcatCTM(float a, float b, float c, float d, float e, float f)
     Concatenate a matrix to the current transformation matrix.
public  PdfAppearancecreateAppearance(float width, float height)
     Creates a new appearance to be used with form fields.
 PdfAppearancecreateAppearance(float width, float height, PdfName forcedName)
    
public  java.awt.Graphics2DcreateGraphics(float width, float height)
     Gets a Graphics2D to write on.
public  java.awt.Graphics2DcreateGraphics(float width, float height, boolean convertImagesToJPEG, float quality)
     Gets a Graphics2D to write on.
public  java.awt.Graphics2DcreateGraphics(float width, float height, FontMapper fontMapper)
     Gets a Graphics2D to write on.
public  java.awt.Graphics2DcreateGraphics(float width, float height, FontMapper fontMapper, boolean convertImagesToJPEG, float quality)
     Gets a Graphics2D to write on.
public  java.awt.Graphics2DcreateGraphicsShapes(float width, float height)
     Gets a Graphics2D to write on.
public  java.awt.Graphics2DcreateGraphicsShapes(float width, float height, boolean convertImagesToJPEG, float quality)
     Gets a Graphics2D to print on.
public  PdfPatternPaintercreatePattern(float width, float height, float xstep, float ystep)
     Create a new colored tiling pattern.
Parameters:
  width - the width of the pattern
Parameters:
  height - the height of the pattern
Parameters:
  xstep - the desired horizontal spacing between pattern cells.May be either positive or negative, but not zero.
Parameters:
  ystep - the desired vertical spacing between pattern cells.May be either positive or negative, but not zero.
public  PdfPatternPaintercreatePattern(float width, float height)
     Create a new colored tiling pattern.
public  PdfPatternPaintercreatePattern(float width, float height, float xstep, float ystep, Color color)
     Create a new uncolored tiling pattern.
Parameters:
  width - the width of the pattern
Parameters:
  height - the height of the pattern
Parameters:
  xstep - the desired horizontal spacing between pattern cells.May be either positive or negative, but not zero.
Parameters:
  ystep - the desired vertical spacing between pattern cells.May be either positive or negative, but not zero.
Parameters:
  color - the default color.
public  PdfPatternPaintercreatePattern(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:
  width - the width of the pattern
Parameters:
  height - the height of the pattern
Parameters:
  color - the default color.
public  java.awt.Graphics2DcreatePrinterGraphics(float width, float height, PrinterJob printerJob)
     Gets a Graphics2D to print on.
public  java.awt.Graphics2DcreatePrinterGraphics(float width, float height, boolean convertImagesToJPEG, float quality, PrinterJob printerJob)
     Gets a Graphics2D to print on.
public  java.awt.Graphics2DcreatePrinterGraphics(float width, float height, FontMapper fontMapper, PrinterJob printerJob)
     Gets a Graphics2D to print on.
public  java.awt.Graphics2DcreatePrinterGraphics(float width, float height, FontMapper fontMapper, boolean convertImagesToJPEG, float quality, PrinterJob printerJob)
     Gets a Graphics2D to print on.
public  java.awt.Graphics2DcreatePrinterGraphicsShapes(float width, float height, PrinterJob printerJob)
     Gets a Graphics2D to print on.
public  java.awt.Graphics2DcreatePrinterGraphicsShapes(float width, float height, boolean convertImagesToJPEG, float quality, PrinterJob printerJob)
     Gets a Graphics2D to print on.
public  PdfTemplatecreateTemplate(float width, float height)
     Creates a new template.

Creates a new template that is nothing more than a form XObject.

 PdfTemplatecreateTemplate(float width, float height, PdfName forcedName)
    
public  voidcurveFromTo(float x1, float y1, float x3, float y3)
     Appends a Bêzier curve to the path, starting from the current point.
public  voidcurveTo(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  voidcurveTo(float x2, float y2, float x3, float y3)
     Appends a Bêzier curve to the path, starting from the current point.
public  voiddrawButton(float llx, float lly, float urx, float ury, String text, BaseFont bf, float size)
     Draws a button.
public  voiddrawRadioField(float llx, float lly, float urx, float ury, boolean on)
     Draws a TextField.
public  voiddrawTextField(float llx, float lly, float urx, float ury)
     Draws a TextField.
public  voidellipse(float x1, float y1, float x2, float y2)
     Draws an ellipse inscribed within the rectangle x1,y1,x2,y2.
public  voidendLayer()
     Ends a layer controled graphic block.
public  voidendMarkedContentSequence()
    
public  voidendText()
     Ends the writing of text and makes the current font invalid.
public  voideoClip()
     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  voideoFill()
     Fills the path, using the even-odd rule to determine the region to fill.
public  voideoFillStroke()
     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  voidescapeString(byte b, ByteBuffer content)
     Escapes a byte array according to the PDF conventions.
public  voidfill()
     Fills the path, using the non-zero winding number rule to determine the region to fill.
public  voidfillStroke()
     Fills the path using the non-zero winding number rule to determine the region to fill and strokes it.
public  floatgetCharacterSpacing()
     Gets the current character spacing.
public  PdfContentBytegetDuplicate()
     Gets a duplicate of this PdfContentByte.
public  floatgetEffectiveStringWidth(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".
public  floatgetHorizontalScaling()
     Gets the current character spacing.
public  ByteBuffergetInternalBuffer()
     Gets the internal buffer.
public static  PdfTextArraygetKernArray(String text, BaseFont font)
    
public  floatgetLeading()
     Gets the current text leading.
 PageResourcesgetPageResources()
    
public  PdfDocumentgetPdfDocument()
     Gets the PdfDocument in use by this object.
public  PdfWritergetPdfWriter()
     Gets the PdfWriter in use by this object.
public  PdfOutlinegetRootOutline()
     Gets the root outline.
public  floatgetWordSpacing()
     Gets the current word spacing.
public  floatgetXTLM()
     Gets the x position of the text line matrix.
public  floatgetYTLM()
     Gets the y position of the text line matrix.
public  voidlineTo(float x, float y)
     Appends a straight line segment from the current point (x, y).
public  booleanlocalDestination(String name, PdfDestination destination)
     The local destination to where a local goto with the same name will jump.
public  voidlocalGoto(String name, float llx, float lly, float urx, float ury)
     Implements a link to other part of the document.
public  voidmoveText(float x, float y)
     Moves to the start of the next line, offset from the start of the current line.
public  voidmoveTextWithLeading(float x, float y)
     Moves to the start of the next line, offset from the start of the current line.
public  voidmoveTo(float x, float y)
     Move the current point (x, y), omitting any connecting line segment.
public  voidnewPath()
     Ends the path without filling or stroking it.
public  voidnewlineShowText(String text)
     Moves to the next line and shows text.
public  voidnewlineShowText(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  voidnewlineText()
     Moves to the start of the next line.
 voidoutputColorNumbers(Color color, float tint)
     Outputs the color values to the content.
public  voidpaintShading(PdfShading shading)
     Paints using a shading object.
public  voidpaintShading(PdfShadingPattern shading)
     Paints using a shading pattern.
public  voidrectangle(float x, float y, float w, float h)
     Adds a rectangle to the current path.
public  voidrectangle(Rectangle rectangle)
     Adds a border (complete or partially) to the current path..
public  voidremoteGoto(String filename, String name, float llx, float lly, float urx, float ury)
     Implements a link to another document.
public  voidremoteGoto(String filename, int page, float llx, float lly, float urx, float ury)
     Implements a link to another document.
public  voidreset()
     Makes this PdfContentByte empty.
public  voidresetCMYKColorFill()
     Changes the current color for filling paths to black.
public  voidresetCMYKColorStroke()
     Changes the current color for stroking paths to black.
public  voidresetGrayFill()
     Changes the current gray tint for filling paths to black.
public  voidresetGrayStroke()
     Changes the current gray tint for stroking paths to black.
public  voidresetRGBColorFill()
     Changes the current color for filling paths to black.
public  voidresetRGBColorStroke()
     Changes the current color for stroking paths to black.
public  voidrestoreState()
     Restores the graphic state.
public  voidroundRectangle(float x, float y, float w, float h, float r)
     Adds a round rectangle to the current path.
public  voidsaveState()
     Saves the graphic state.
public  voidsetAction(PdfAction action, float llx, float lly, float urx, float ury)
     Implements an action in an area.
public  voidsetCMYKColorFill(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).

public  voidsetCMYKColorFillF(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).


Parameters:
  cyan - the intensity of cyan.
public  voidsetCMYKColorStroke(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 (miniumum intensity) and 1 (maximum intensity).
public  voidsetCMYKColorStrokeF(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).
Parameters:
  cyan - the intensity of cyan.

public  voidsetCharacterSpacing(float charSpace)
     Sets the character spacing parameter.
public  voidsetColorFill(Color color)
     Sets the fill color.
public  voidsetColorFill(PdfSpotColor sp, float tint)
     Sets the fill color to a spot color.
Parameters:
  sp - the spot color
Parameters:
  tint - the tint for the spot color.
public  voidsetColorStroke(Color color)
     Sets the stroke color.
public  voidsetColorStroke(PdfSpotColor sp, float tint)
     Sets the stroke color to a spot color.
Parameters:
  sp - the spot color
Parameters:
  tint - the tint for the spot color.
public  voidsetDefaultColorspace(PdfName name, PdfObject obj)
     Sets the default colorspace.
Parameters:
  name - the name of the colorspace.
public  voidsetFlatness(float flatness)
     Changes the Flatness.
public  voidsetFontAndSize(BaseFont bf, float size)
     Set the font and the size for the subsequent text writing.
public  voidsetGState(PdfGState gstate)
    
public  voidsetGrayFill(float gray)
     Changes the currentgray tint for filling paths (device dependent colors!).
public  voidsetGrayStroke(float gray)
     Changes the currentgray tint for stroking paths (device dependent colors!).
public  voidsetHorizontalScaling(float scale)
     Sets the horizontal scaling parameter.
public  voidsetLeading(float leading)
     Sets the text leading parameter.

The leading parameter is measured in text space units.

public  voidsetLineCap(int style)
     Changes the Line cap style.
public  voidsetLineDash(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.

public  voidsetLineDash(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.

public  voidsetLineDash(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.

final public  voidsetLineDash(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.

public  voidsetLineJoin(int style)
     Changes the Line join style.
public  voidsetLineWidth(float w)
     Changes the line width.
public  voidsetLiteral(String s)
     Outputs a String directly to the content.
public  voidsetLiteral(char c)
     Outputs a char directly to the content.
public  voidsetLiteral(float n)
     Outputs a float directly to the content.
public  voidsetMiterLimit(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.

public  voidsetPatternFill(PdfPatternPainter p)
     Sets the fill color to a pattern.
public  voidsetPatternFill(PdfPatternPainter p, Color color)
     Sets the fill color to an uncolored pattern.
public  voidsetPatternFill(PdfPatternPainter p, Color color, float tint)
     Sets the fill color to an uncolored pattern.
public  voidsetPatternStroke(PdfPatternPainter p, Color color)
     Sets the stroke color to an uncolored pattern.
public  voidsetPatternStroke(PdfPatternPainter p, Color color, float tint)
     Sets the stroke color to an uncolored pattern.
public  voidsetPatternStroke(PdfPatternPainter p)
     Sets the stroke color to a pattern.
public  voidsetRGBColorFill(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 (miniumum intensity) and 1 (maximum intensity).

public  voidsetRGBColorFillF(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).


Parameters:
  red - the intensity of red.
public  voidsetRGBColorStroke(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 (miniumum intensity) and 1 (maximum intensity).
public  voidsetRGBColorStrokeF(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).
Parameters:
  red - the intensity of red.

public  voidsetShadingFill(PdfShadingPattern shading)
     Sets the shading fill pattern.
public  voidsetShadingStroke(PdfShadingPattern shading)
    
public  voidsetTextMatrix(float a, float b, float c, float d, float x, float y)
     Changes the text matrix.
public  voidsetTextMatrix(float x, float y)
     Changes the text matrix.
public  voidsetTextRenderingMode(int rendering)
     Sets the text rendering parameter.
public  voidsetTextRise(float rise)
     Sets the text rise parameter.
public  voidsetWordSpacing(float wordSpace)
     Sets the word spacing parameter.
public  voidshowText(String text)
     Shows the text.
public  voidshowText(PdfTextArray text)
     Show an array of text.
public  voidshowTextAligned(int alignment, String text, float x, float y, float rotation)
     Shows text right, left or center aligned with rotation.
public  voidshowTextAlignedKerned(int alignment, String text, float x, float y, float rotation)
     Shows text kerned right, left or center aligned with rotation.
public  voidshowTextKerned(String text)
     Shows the text kerned.
 intsize()
     Gets the size of this content.
public  voidstroke()
     Strokes the path.
public  byte[]toPdf(PdfWriter writer)
     Returns the PDF representation of this PdfContentByte-object.
public  StringtoString()
     Returns the String representation of this PdfContentByte-object.
public  voidtransform(AffineTransform af)
     Concatenates a transformation to the current transformation matrix.
public  voidvariableRectangle(Rectangle rect)
     Adds a variable width border to the current path.

Field Detail
ALIGN_CENTER
final public static int ALIGN_CENTER(Code)
The alignement is center



ALIGN_LEFT
final public static int ALIGN_LEFT(Code)
The alignement is left



ALIGN_RIGHT
final public static int ALIGN_RIGHT(Code)
The alignement is right



LINE_CAP_BUTT
final public static int LINE_CAP_BUTT(Code)
A possible line cap value



LINE_CAP_PROJECTING_SQUARE
final public static int LINE_CAP_PROJECTING_SQUARE(Code)
A possible line cap value



LINE_CAP_ROUND
final public static int LINE_CAP_ROUND(Code)
A possible line cap value



LINE_JOIN_BEVEL
final public static int LINE_JOIN_BEVEL(Code)
A possible line join value



LINE_JOIN_MITER
final public static int LINE_JOIN_MITER(Code)
A possible line join value



LINE_JOIN_ROUND
final public static int LINE_JOIN_ROUND(Code)
A possible line join value



TEXT_RENDER_MODE_CLIP
final public static int TEXT_RENDER_MODE_CLIP(Code)
A possible text rendering value



TEXT_RENDER_MODE_FILL
final public static int TEXT_RENDER_MODE_FILL(Code)
A possible text rendering value



TEXT_RENDER_MODE_FILL_CLIP
final public static int TEXT_RENDER_MODE_FILL_CLIP(Code)
A possible text rendering value



TEXT_RENDER_MODE_FILL_STROKE
final public static int TEXT_RENDER_MODE_FILL_STROKE(Code)
A possible text rendering value



TEXT_RENDER_MODE_FILL_STROKE_CLIP
final public static int TEXT_RENDER_MODE_FILL_STROKE_CLIP(Code)
A possible text rendering value



TEXT_RENDER_MODE_INVISIBLE
final public static int TEXT_RENDER_MODE_INVISIBLE(Code)
A possible text rendering value



TEXT_RENDER_MODE_STROKE
final public static int TEXT_RENDER_MODE_STROKE(Code)
A possible text rendering value



TEXT_RENDER_MODE_STROKE_CLIP
final public static int TEXT_RENDER_MODE_STROKE_CLIP(Code)
A possible text rendering value



content
protected ByteBuffer content(Code)
This is the actual content



layerDepth
protected ArrayList layerDepth(Code)
The list were we save/restore the layer depth



pdf
protected PdfDocument pdf(Code)
This is the PdfDocument



separator
protected int separator(Code)
The separator between commands.



state
protected GraphicState state(Code)
This is the GraphicState in use



stateList
protected ArrayList stateList(Code)
The list were we save/restore the state



writer
protected PdfWriter writer(Code)
This is the writer




Constructor Detail
PdfContentByte
public PdfContentByte(PdfWriter wr)(Code)
Constructs a new PdfContentByte-object.
Parameters:
  wr - the writer associated to this content




Method Detail
add
public void add(PdfContentByte other)(Code)
Adds the content of another PdfContent-object to this object.
Parameters:
  other - another PdfByteContent-object



addAnnotation
void addAnnotation(PdfAnnotation annot)(Code)



addImage
public void addImage(Image image) throws DocumentException(Code)
Adds an Image to the page. The Image must have absolute positioning.
Parameters:
  image - the Image object
throws:
  DocumentException - if the Image does not have absolute positioning



addImage
public void addImage(Image image, boolean inlineImage) throws DocumentException(Code)
Adds an Image to the page. The Image must have absolute positioning. The image can be placed inline.
Parameters:
  image - the Image object
Parameters:
  inlineImage - true to place this image inline, false otherwise
throws:
  DocumentException - if the Image does not have absolute positioning



addImage
public void addImage(Image image, float a, float b, float c, float d, float e, float f) throws DocumentException(Code)
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:
  image - the Image object
Parameters:
  a - an element of the transformation matrix
Parameters:
  b - an element of the transformation matrix
Parameters:
  c - an element of the transformation matrix
Parameters:
  d - an element of the transformation matrix
Parameters:
  e - an element of the transformation matrix
Parameters:
  f - an element of the transformation matrix
throws:
  DocumentException - on error



addImage
public void addImage(Image image, float a, float b, float c, float d, float e, float f, boolean inlineImage) throws DocumentException(Code)
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:
  image - the Image object
Parameters:
  a - an element of the transformation matrix
Parameters:
  b - an element of the transformation matrix
Parameters:
  c - an element of the transformation matrix
Parameters:
  d - an element of the transformation matrix
Parameters:
  e - an element of the transformation matrix
Parameters:
  f - an element of the transformation matrix
Parameters:
  inlineImage - true to place this image inline, false otherwise
throws:
  DocumentException - on error



addOutline
public void addOutline(PdfOutline outline)(Code)
Adds an outline to the document.
Parameters:
  outline - the outline



addOutline
public void addOutline(PdfOutline outline, String name)(Code)
Adds a named outline to the document.
Parameters:
  outline - the outline
Parameters:
  name - the name for the local destination



addPSXObject
public void addPSXObject(PdfPSXObject psobject)(Code)
Adds a PostScript XObject to this content.
Parameters:
  psobject - the object



addTemplate
public void addTemplate(PdfTemplate template, float a, float b, float c, float d, float e, float f)(Code)
Adds a template to this content.
Parameters:
  template - the template
Parameters:
  a - an element of the transformation matrix
Parameters:
  b - an element of the transformation matrix
Parameters:
  c - an element of the transformation matrix
Parameters:
  d - an element of the transformation matrix
Parameters:
  e - an element of the transformation matrix
Parameters:
  f - an element of the transformation matrix



addTemplate
public void addTemplate(PdfTemplate template, float x, float y)(Code)
Adds a template to this content.
Parameters:
  template - the template
Parameters:
  x - the x location of this template
Parameters:
  y - the y location of this template



addTemplateReference
void addTemplateReference(PdfIndirectReference template, PdfName name, float a, float b, float c, float d, float e, float f)(Code)



arc
public void arc(float x1, float y1, float x2, float y2, float startAng, float extent)(Code)
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:
  x1 - a corner of the enclosing rectangle
Parameters:
  y1 - a corner of the enclosing rectangle
Parameters:
  x2 - a corner of the enclosing rectangle
Parameters:
  y2 - a corner of the enclosing rectangle
Parameters:
  startAng - starting angle in degrees
Parameters:
  extent - angle extent in degrees



beginLayer
public void beginLayer(PdfOCG layer)(Code)
Begins a graphic block whose visibility is controled by the layer. Blocks can be nested. Each block must be terminated by an PdfContentByte.endLayer() .

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




beginMarkedContentSequence
public void beginMarkedContentSequence(PdfStructureElement struc)(Code)
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:
  struc - the tagging structure



beginMarkedContentSequence
public void beginMarkedContentSequence(PdfName tag, PdfDictionary property, boolean inline)(Code)
Begins a marked content sequence. If property is null the mark will be of the type BMC otherwise it will be BDC.
Parameters:
  tag - the tag
Parameters:
  property - the property
Parameters:
  inline - true to include the property in the content or falseto include the property in the resource dictionary with the possibility of reusing



beginMarkedContentSequence
public void beginMarkedContentSequence(PdfName tag)(Code)
This is just a shorthand to beginMarkedContentSequence(tag, null, false).
Parameters:
  tag - the tag



beginText
public void beginText()(Code)
Starts the writing of text.



bezierArc
public static ArrayList bezierArc(float x1, float y1, float x2, float y2, float startAng, float extent)(Code)
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 excelent PDF generator for Python (BSD license: http://www.reportlab.org/devfaq.html#1.3 ).
Parameters:
  x1 - a corner of the enclosing rectangle
Parameters:
  y1 - a corner of the enclosing rectangle
Parameters:
  x2 - a corner of the enclosing rectangle
Parameters:
  y2 - a corner of the enclosing rectangle
Parameters:
  startAng - starting angle in degrees
Parameters:
  extent - angle extent in degrees a list of float[] with the bezier curves




checkNoPattern
void checkNoPattern(PdfTemplate t)(Code)
Throws an error if it is a pattern.
Parameters:
  t - the object to check



checkWriter
protected void checkWriter()(Code)
Check if we have a valid PdfWriter.



circle
public void circle(float x, float y, float r)(Code)
Draws a circle. The endpoint will (x+r, y).
Parameters:
  x - x center of circle
Parameters:
  y - y center of circle
Parameters:
  r - radius of circle



clip
public void clip()(Code)
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
public void closePath()(Code)
Closes the current subpath by appending a straight line segment from the current point to the starting point of the subpath.



closePathEoFillStroke
public void closePathEoFillStroke()(Code)
Closes the path, fills it using the even-odd rule to determine the region to fill and strokes it.



closePathFillStroke
public void closePathFillStroke()(Code)
Closes the path, fills it using the non-zero winding number rule to determine the region to fill and strokes it.



closePathStroke
public void closePathStroke()(Code)
Closes the path and strokes it.



concatCTM
public void concatCTM(float a, float b, float c, float d, float e, float f)(Code)
Concatenate a matrix to the current transformation matrix.
Parameters:
  a - an element of the transformation matrix
Parameters:
  b - an element of the transformation matrix
Parameters:
  c - an element of the transformation matrix
Parameters:
  d - an element of the transformation matrix
Parameters:
  e - an element of the transformation matrix
Parameters:
  f - an element of the transformation matrix



createAppearance
public PdfAppearance createAppearance(float width, float height)(Code)
Creates a new appearance to be used with form fields.
Parameters:
  width - the bounding box width
Parameters:
  height - the bounding box height the appearance created



createAppearance
PdfAppearance createAppearance(float width, float height, PdfName forcedName)(Code)



createGraphics
public java.awt.Graphics2D createGraphics(float width, float height)(Code)
Gets a Graphics2D to write on. The graphics are translated to PDF commands.
Parameters:
  width - the width of the panel
Parameters:
  height - the height of the panel a Graphics2D



createGraphics
public java.awt.Graphics2D createGraphics(float width, float height, boolean convertImagesToJPEG, float quality)(Code)
Gets a Graphics2D to write on. The graphics are translated to PDF commands.
Parameters:
  width - the width of the panel
Parameters:
  height - the height of the panel
Parameters:
  convertImagesToJPEG -
Parameters:
  quality - a Graphics2D



createGraphics
public java.awt.Graphics2D createGraphics(float width, float height, FontMapper fontMapper)(Code)
Gets a Graphics2D to write on. The graphics are translated to PDF commands.
Parameters:
  width - the width of the panel
Parameters:
  height - the height of the panel
Parameters:
  fontMapper - the mapping from awt fonts to BaseFont a Graphics2D



createGraphics
public java.awt.Graphics2D createGraphics(float width, float height, FontMapper fontMapper, boolean convertImagesToJPEG, float quality)(Code)
Gets a Graphics2D to write on. The graphics are translated to PDF commands.
Parameters:
  width - the width of the panel
Parameters:
  height - the height of the panel
Parameters:
  fontMapper - the mapping from awt fonts to BaseFont
Parameters:
  convertImagesToJPEG - converts awt images to jpeg before inserting in pdf
Parameters:
  quality - the quality of the jpeg a Graphics2D



createGraphicsShapes
public java.awt.Graphics2D createGraphicsShapes(float width, float height)(Code)
Gets a Graphics2D to write on. The graphics are translated to PDF commands as shapes. No PDF fonts will appear.
Parameters:
  width - the width of the panel
Parameters:
  height - the height of the panel a Graphics2D



createGraphicsShapes
public java.awt.Graphics2D createGraphicsShapes(float width, float height, boolean convertImagesToJPEG, float quality)(Code)
Gets a Graphics2D to print on. The graphics are translated to PDF commands.
Parameters:
  width -
Parameters:
  height -
Parameters:
  convertImagesToJPEG -
Parameters:
  quality - A Graphics2D object



createPattern
public PdfPatternPainter createPattern(float width, float height, float xstep, float ystep)(Code)
Create a new colored tiling pattern.
Parameters:
  width - the width of the pattern
Parameters:
  height - the height of the pattern
Parameters:
  xstep - the desired horizontal spacing between pattern cells.May be either positive or negative, but not zero.
Parameters:
  ystep - the desired vertical spacing between pattern cells.May be either positive or negative, but not zero. the PdfPatternPainter where the pattern will be created



createPattern
public PdfPatternPainter createPattern(float width, float height)(Code)
Create a new colored tiling pattern. Variables xstep and ystep are set to the same values of width and height.
Parameters:
  width - the width of the pattern
Parameters:
  height - the height of the pattern the PdfPatternPainter where the pattern will be created



createPattern
public PdfPatternPainter createPattern(float width, float height, float xstep, float ystep, Color color)(Code)
Create a new uncolored tiling pattern.
Parameters:
  width - the width of the pattern
Parameters:
  height - the height of the pattern
Parameters:
  xstep - the desired horizontal spacing between pattern cells.May be either positive or negative, but not zero.
Parameters:
  ystep - the desired vertical spacing between pattern cells.May be either positive or negative, but not zero.
Parameters:
  color - the default color. Can be null the PdfPatternPainter where the pattern will be created



createPattern
public PdfPatternPainter createPattern(float width, float height, Color color)(Code)
Create a new uncolored tiling pattern. Variables xstep and ystep are set to the same values of width and height.
Parameters:
  width - the width of the pattern
Parameters:
  height - the height of the pattern
Parameters:
  color - the default color. Can be null the PdfPatternPainter where the pattern will be created



createPrinterGraphics
public java.awt.Graphics2D createPrinterGraphics(float width, float height, PrinterJob printerJob)(Code)
Gets a Graphics2D to print on. The graphics are translated to PDF commands.
Parameters:
  width - the width of the panel
Parameters:
  height - the height of the panel
Parameters:
  printerJob - a Graphics2D



createPrinterGraphics
public java.awt.Graphics2D createPrinterGraphics(float width, float height, boolean convertImagesToJPEG, float quality, PrinterJob printerJob)(Code)
Gets a Graphics2D to print on. The graphics are translated to PDF commands.
Parameters:
  width - the width of the panel
Parameters:
  height - the height of the panel
Parameters:
  convertImagesToJPEG -
Parameters:
  quality -
Parameters:
  printerJob - a Graphics2D



createPrinterGraphics
public java.awt.Graphics2D createPrinterGraphics(float width, float height, FontMapper fontMapper, PrinterJob printerJob)(Code)
Gets a Graphics2D to print on. The graphics are translated to PDF commands.
Parameters:
  width - the width of the panel
Parameters:
  height - the height of the panel
Parameters:
  fontMapper - the mapping from awt fonts to BaseFont
Parameters:
  printerJob - a printer job a Graphics2D



createPrinterGraphics
public java.awt.Graphics2D createPrinterGraphics(float width, float height, FontMapper fontMapper, boolean convertImagesToJPEG, float quality, PrinterJob printerJob)(Code)
Gets a Graphics2D to print on. The graphics are translated to PDF commands.
Parameters:
  width - the width of the panel
Parameters:
  height - the height of the panel
Parameters:
  fontMapper - the mapping from awt fonts to BaseFont
Parameters:
  convertImagesToJPEG - converts awt images to jpeg before inserting in pdf
Parameters:
  quality - the quality of the jpeg
Parameters:
  printerJob - a printer job a Graphics2D



createPrinterGraphicsShapes
public java.awt.Graphics2D createPrinterGraphicsShapes(float width, float height, PrinterJob printerJob)(Code)
Gets a Graphics2D to print on. The graphics are translated to PDF commands as shapes. No PDF fonts will appear.
Parameters:
  width - the width of the panel
Parameters:
  height - the height of the panel
Parameters:
  printerJob - a printer job a Graphics2D



createPrinterGraphicsShapes
public java.awt.Graphics2D createPrinterGraphicsShapes(float width, float height, boolean convertImagesToJPEG, float quality, PrinterJob printerJob)(Code)
Gets a Graphics2D to print on. The graphics are translated to PDF commands.
Parameters:
  width -
Parameters:
  height -
Parameters:
  convertImagesToJPEG -
Parameters:
  quality -
Parameters:
  printerJob - a Graphics2D object



createTemplate
public PdfTemplate createTemplate(float width, float height)(Code)
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:
  width - the bounding box width
Parameters:
  height - the bounding box height the templated created




createTemplate
PdfTemplate createTemplate(float width, float height, PdfName forcedName)(Code)



curveFromTo
public void curveFromTo(float x1, float y1, float x3, float y3)(Code)
Appends a Bêzier curve to the path, starting from the current point.
Parameters:
  x1 - x-coordinate of the first control point
Parameters:
  y1 - y-coordinate of the first control point
Parameters:
  x3 - x-coordinaat of the ending point (= new current point)
Parameters:
  y3 - y-coordinaat of the ending point (= new current point)



curveTo
public void curveTo(float x1, float y1, float x2, float y2, float x3, float y3)(Code)
Appends a Bêzier curve to the path, starting from the current point.
Parameters:
  x1 - x-coordinate of the first control point
Parameters:
  y1 - y-coordinate of the first control point
Parameters:
  x2 - x-coordinate of the second control point
Parameters:
  y2 - y-coordinate of the second control point
Parameters:
  x3 - x-coordinaat of the ending point (= new current point)
Parameters:
  y3 - y-coordinaat of the ending point (= new current point)



curveTo
public void curveTo(float x2, float y2, float x3, float y3)(Code)
Appends a Bêzier curve to the path, starting from the current point.
Parameters:
  x2 - x-coordinate of the second control point
Parameters:
  y2 - y-coordinate of the second control point
Parameters:
  x3 - x-coordinaat of the ending point (= new current point)
Parameters:
  y3 - y-coordinaat of the ending point (= new current point)



drawButton
public void drawButton(float llx, float lly, float urx, float ury, String text, BaseFont bf, float size)(Code)
Draws a button.
Parameters:
  llx -
Parameters:
  lly -
Parameters:
  urx -
Parameters:
  ury -
Parameters:
  text -
Parameters:
  bf -
Parameters:
  size -



drawRadioField
public void drawRadioField(float llx, float lly, float urx, float ury, boolean on)(Code)
Draws a TextField.
Parameters:
  llx -
Parameters:
  lly -
Parameters:
  urx -
Parameters:
  ury -
Parameters:
  on -



drawTextField
public void drawTextField(float llx, float lly, float urx, float ury)(Code)
Draws a TextField.
Parameters:
  llx -
Parameters:
  lly -
Parameters:
  urx -
Parameters:
  ury -



ellipse
public void ellipse(float x1, float y1, float x2, float y2)(Code)
Draws an ellipse inscribed within the rectangle x1,y1,x2,y2.
Parameters:
  x1 - a corner of the enclosing rectangle
Parameters:
  y1 - a corner of the enclosing rectangle
Parameters:
  x2 - a corner of the enclosing rectangle
Parameters:
  y2 - a corner of the enclosing rectangle



endLayer
public void endLayer()(Code)
Ends a layer controled graphic block. It will end the most recent open block.



endMarkedContentSequence
public void endMarkedContentSequence()(Code)
Ends a marked content sequence



endText
public void endText()(Code)
Ends the writing of text and makes the current font invalid.



eoClip
public void eoClip()(Code)
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
public void eoFill()(Code)
Fills the path, using the even-odd rule to determine the region to fill.



eoFillStroke
public void eoFillStroke()(Code)
Fills the path, using the even-odd rule to determine the region to fill and strokes it.



escapeString
static byte[] escapeString(byte b)(Code)
Escapes a byte array according to the PDF conventions.
Parameters:
  b - the byte array to escape an escaped byte array



escapeString
static void escapeString(byte b, ByteBuffer content)(Code)
Escapes a byte array according to the PDF conventions.
Parameters:
  b - the byte array to escape
Parameters:
  content - the content



fill
public void fill()(Code)
Fills the path, using the non-zero winding number rule to determine the region to fill.



fillStroke
public void fillStroke()(Code)
Fills the path using the non-zero winding number rule to determine the region to fill and strokes it.



getCharacterSpacing
public float getCharacterSpacing()(Code)
Gets the current character spacing. the current character spacing



getDuplicate
public PdfContentByte getDuplicate()(Code)
Gets a duplicate of this PdfContentByte. All the members are copied by reference but the buffer stays different. a copy of this PdfContentByte



getEffectiveStringWidth
public float getEffectiveStringWidth(String text, boolean kerned)(Code)
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:
  text - the string to get width of
Parameters:
  kerned - the kerning option the width



getHorizontalScaling
public float getHorizontalScaling()(Code)
Gets the current character spacing. the current character spacing



getInternalBuffer
public ByteBuffer getInternalBuffer()(Code)
Gets the internal buffer. the internal buffer



getKernArray
public static PdfTextArray getKernArray(String text, BaseFont font)(Code)
Constructs a kern array for a text in a certain font
Parameters:
  text - the text
Parameters:
  font - the font a PdfTextArray



getLeading
public float getLeading()(Code)
Gets the current text leading. the current text leading



getPageResources
PageResources getPageResources()(Code)



getPdfDocument
public PdfDocument getPdfDocument()(Code)
Gets the PdfDocument in use by this object. the PdfDocument in use by this object



getPdfWriter
public PdfWriter getPdfWriter()(Code)
Gets the PdfWriter in use by this object. the PdfWriter in use by this object



getRootOutline
public PdfOutline getRootOutline()(Code)
Gets the root outline. the root outline



getWordSpacing
public float getWordSpacing()(Code)
Gets the current word spacing. the current word spacing



getXTLM
public float getXTLM()(Code)
Gets the x position of the text line matrix. the x position of the text line matrix



getYTLM
public float getYTLM()(Code)
Gets the y position of the text line matrix. the y position of the text line matrix



lineTo
public void lineTo(float x, float y)(Code)
Appends a straight line segment from the current point (x, y). The new current point is (x, y).
Parameters:
  x - new x-coordinate
Parameters:
  y - new y-coordinate



localDestination
public boolean localDestination(String name, PdfDestination destination)(Code)
The local destination to where a local goto with the same name will jump.
Parameters:
  name - the name of this local destination
Parameters:
  destination - the PdfDestination with the jump coordinates true if the local destination was added,false if a local destination with the same namealready exists



localGoto
public void localGoto(String name, float llx, float lly, float urx, float ury)(Code)
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:
  name - the name for this link
Parameters:
  llx - the lower left x corner of the activation area
Parameters:
  lly - the lower left y corner of the activation area
Parameters:
  urx - the upper right x corner of the activation area
Parameters:
  ury - the upper right y corner of the activation area



moveText
public void moveText(float x, float y)(Code)
Moves to the start of the next line, offset from the start of the current line.
Parameters:
  x - x-coordinate of the new current point
Parameters:
  y - y-coordinate of the new current point



moveTextWithLeading
public void moveTextWithLeading(float x, float y)(Code)
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:
  x - offset of the new current point
Parameters:
  y - y-coordinate of the new current point



moveTo
public void moveTo(float x, float y)(Code)
Move the current point (x, y), omitting any connecting line segment.
Parameters:
  x - new x-coordinate
Parameters:
  y - new y-coordinate



newPath
public void newPath()(Code)
Ends the path without filling or stroking it.



newlineShowText
public void newlineShowText(String text)(Code)
Moves to the next line and shows text.
Parameters:
  text - the text to write



newlineShowText
public void newlineShowText(float wordSpacing, float charSpacing, String text)(Code)
Moves to the next line and shows text string, using the given values of the character and word spacing parameters.
Parameters:
  wordSpacing - a parameter
Parameters:
  charSpacing - a parameter
Parameters:
  text - the text to write



newlineText
public void newlineText()(Code)
Moves to the start of the next line.



outputColorNumbers
void outputColorNumbers(Color color, float tint)(Code)
Outputs the color values to the content.
Parameters:
  color - The color
Parameters:
  tint - the tint if it is a spot color, ignored otherwise



paintShading
public void paintShading(PdfShading shading)(Code)
Paints using a shading object.
Parameters:
  shading - the shading object



paintShading
public void paintShading(PdfShadingPattern shading)(Code)
Paints using a shading pattern.
Parameters:
  shading - the shading pattern



rectangle
public void rectangle(float x, float y, float w, float h)(Code)
Adds a rectangle to the current path.
Parameters:
  x - x-coordinate of the starting point
Parameters:
  y - y-coordinate of the starting point
Parameters:
  w - width
Parameters:
  h - height



rectangle
public void rectangle(Rectangle rectangle)(Code)
Adds a border (complete or partially) to the current path..
Parameters:
  rectangle - a Rectangle



remoteGoto
public void remoteGoto(String filename, String name, float llx, float lly, float urx, float ury)(Code)
Implements a link to another document.
Parameters:
  filename - the filename for the remote document
Parameters:
  name - the name to jump to
Parameters:
  llx - the lower left x corner of the activation area
Parameters:
  lly - the lower left y corner of the activation area
Parameters:
  urx - the upper right x corner of the activation area
Parameters:
  ury - the upper right y corner of the activation area



remoteGoto
public void remoteGoto(String filename, int page, float llx, float lly, float urx, float ury)(Code)
Implements a link to another document.
Parameters:
  filename - the filename for the remote document
Parameters:
  page - the page to jump to
Parameters:
  llx - the lower left x corner of the activation area
Parameters:
  lly - the lower left y corner of the activation area
Parameters:
  urx - the upper right x corner of the activation area
Parameters:
  ury - the upper right y corner of the activation area



reset
public void reset()(Code)
Makes this PdfContentByte empty.



resetCMYKColorFill
public void resetCMYKColorFill()(Code)
Changes the current color for filling paths to black.



resetCMYKColorStroke
public void resetCMYKColorStroke()(Code)
Changes the current color for stroking paths to black.



resetGrayFill
public void resetGrayFill()(Code)
Changes the current gray tint for filling paths to black.



resetGrayStroke
public void resetGrayStroke()(Code)
Changes the current gray tint for stroking paths to black.



resetRGBColorFill
public void resetRGBColorFill()(Code)
Changes the current color for filling paths to black.



resetRGBColorStroke
public void resetRGBColorStroke()(Code)
Changes the current color for stroking paths to black.



restoreState
public void restoreState()(Code)
Restores the graphic state. saveState and restoreState must be balanced.



roundRectangle
public void roundRectangle(float x, float y, float w, float h, float r)(Code)
Adds a round rectangle to the current path.
Parameters:
  x - x-coordinate of the starting point
Parameters:
  y - y-coordinate of the starting point
Parameters:
  w - width
Parameters:
  h - height
Parameters:
  r - radius of the arc corner



saveState
public void saveState()(Code)
Saves the graphic state. saveState and restoreState must be balanced.



setAction
public void setAction(PdfAction action, float llx, float lly, float urx, float ury)(Code)
Implements an action in an area.
Parameters:
  action - the PdfAction
Parameters:
  llx - the lower left x corner of the activation area
Parameters:
  lly - the lower left y corner of the activation area
Parameters:
  urx - the upper right x corner of the activation area
Parameters:
  ury - the upper right y corner of the activation area



setCMYKColorFill
public void setCMYKColorFill(int cyan, int magenta, int yellow, int black)(Code)
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.


Parameters:
  cyan - the intensity of cyan
Parameters:
  magenta - the intensity of magenta
Parameters:
  yellow - the intensity of yellow
Parameters:
  black - the intensity of black



setCMYKColorFillF
public void setCMYKColorFillF(float cyan, float magenta, float yellow, float black)(Code)
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:
  cyan - the intensity of cyan. A value between 0 and 1
Parameters:
  magenta - the intensity of magenta. A value between 0 and 1
Parameters:
  yellow - the intensity of yellow. A value between 0 and 1
Parameters:
  black - the intensity of black. A value between 0 and 1



setCMYKColorStroke
public void setCMYKColorStroke(int cyan, int magenta, int yellow, int black)(Code)
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 integers between 0x00 and 0xFF.
Parameters:
  cyan - the intensity of red
Parameters:
  magenta - the intensity of green
Parameters:
  yellow - the intensity of blue
Parameters:
  black - the intensity of black



setCMYKColorStrokeF
public void setCMYKColorStrokeF(float cyan, float magenta, float yellow, float black)(Code)
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:
  cyan - the intensity of cyan. A value between 0 and 1
Parameters:
  magenta - the intensity of magenta. A value between 0 and 1
Parameters:
  yellow - the intensity of yellow. A value between 0 and 1
Parameters:
  black - the intensity of black. A value between 0 and 1




setCharacterSpacing
public void setCharacterSpacing(float charSpace)(Code)
Sets the character spacing parameter.
Parameters:
  charSpace - a parameter



setColorFill
public void setColorFill(Color color)(Code)
Sets the fill color. color can be an ExtendedColor.
Parameters:
  color - the color



setColorFill
public void setColorFill(PdfSpotColor sp, float tint)(Code)
Sets the fill color to a spot color.
Parameters:
  sp - the spot color
Parameters:
  tint - the tint for the spot color. 0 is no color and 1is 100% color



setColorStroke
public void setColorStroke(Color color)(Code)
Sets the stroke color. color can be an ExtendedColor.
Parameters:
  color - the color



setColorStroke
public void setColorStroke(PdfSpotColor sp, float tint)(Code)
Sets the stroke color to a spot color.
Parameters:
  sp - the spot color
Parameters:
  tint - the tint for the spot color. 0 is no color and 1is 100% color



setDefaultColorspace
public void setDefaultColorspace(PdfName name, PdfObject obj)(Code)
Sets the default colorspace.
Parameters:
  name - the name of the colorspace. It can be PdfName.DEFAULTGRAY, PdfName.DEFAULTRGBor PdfName.DEFAULTCMYK
Parameters:
  obj - the colorspace. A null or PdfNull removes any colorspace with the same name



setFlatness
public void setFlatness(float flatness)(Code)
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:
  flatness - a value




setFontAndSize
public void setFontAndSize(BaseFont bf, float size)(Code)
Set the font and the size for the subsequent text writing.
Parameters:
  bf - the font
Parameters:
  size - the font size in points



setGState
public void setGState(PdfGState gstate)(Code)
Sets the graphic state
Parameters:
  gstate - the graphic state



setGrayFill
public void setGrayFill(float gray)(Code)
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:
  gray - a value between 0 (black) and 1 (white)



setGrayStroke
public void setGrayStroke(float gray)(Code)
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:
  gray - a value between 0 (black) and 1 (white)



setHorizontalScaling
public void setHorizontalScaling(float scale)(Code)
Sets the horizontal scaling parameter.
Parameters:
  scale - a parameter



setLeading
public void setLeading(float leading)(Code)
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.


Parameters:
  leading - the new leading



setLineCap
public void setLineCap(int style)(Code)
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.

Parameters:
  style - a value




setLineDash
public void setLineDash(float phase)(Code)
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:
  phase - the value of the phase




setLineDash
public void setLineDash(float unitsOn, float phase)(Code)
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:
  phase - the value of the phase
Parameters:
  unitsOn - the number of units that must be 'on' (equals the number of units that must be 'off').




setLineDash
public void setLineDash(float unitsOn, float unitsOff, float phase)(Code)
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:
  phase - the value of the phase
Parameters:
  unitsOn - the number of units that must be 'on'
Parameters:
  unitsOff - the number of units that must be 'off'




setLineDash
final public void setLineDash(float[] array, float phase)(Code)
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:
  array - length of the alternating dashes and gaps
Parameters:
  phase - the value of the phase




setLineJoin
public void setLineJoin(int style)(Code)
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).

Parameters:
  style - a value




setLineWidth
public void setLineWidth(float w)(Code)
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.

Parameters:
  w - a width




setLiteral
public void setLiteral(String s)(Code)
Outputs a String directly to the content.
Parameters:
  s - the String



setLiteral
public void setLiteral(char c)(Code)
Outputs a char directly to the content.
Parameters:
  c - the char



setLiteral
public void setLiteral(float n)(Code)
Outputs a float directly to the content.
Parameters:
  n - the float



setMiterLimit
public void setMiterLimit(float miterLimit)(Code)
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:
  miterLimit - a miter limit




setPatternFill
public void setPatternFill(PdfPatternPainter p)(Code)
Sets the fill color to a pattern. The pattern can be colored or uncolored.
Parameters:
  p - the pattern



setPatternFill
public void setPatternFill(PdfPatternPainter p, Color color)(Code)
Sets the fill color to an uncolored pattern.
Parameters:
  p - the pattern
Parameters:
  color - the color of the pattern



setPatternFill
public void setPatternFill(PdfPatternPainter p, Color color, float tint)(Code)
Sets the fill color to an uncolored pattern.
Parameters:
  p - the pattern
Parameters:
  color - the color of the pattern
Parameters:
  tint - the tint if the color is a spot color, ignored otherwise



setPatternStroke
public void setPatternStroke(PdfPatternPainter p, Color color)(Code)
Sets the stroke color to an uncolored pattern.
Parameters:
  p - the pattern
Parameters:
  color - the color of the pattern



setPatternStroke
public void setPatternStroke(PdfPatternPainter p, Color color, float tint)(Code)
Sets the stroke color to an uncolored pattern.
Parameters:
  p - the pattern
Parameters:
  color - the color of the pattern
Parameters:
  tint - the tint if the color is a spot color, ignored otherwise



setPatternStroke
public void setPatternStroke(PdfPatternPainter p)(Code)
Sets the stroke color to a pattern. The pattern can be colored or uncolored.
Parameters:
  p - the pattern



setRGBColorFill
public void setRGBColorFill(int red, int green, int blue)(Code)
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 integers between 0x00 and 0xFF.


Parameters:
  red - the intensity of red
Parameters:
  green - the intensity of green
Parameters:
  blue - the intensity of blue



setRGBColorFillF
public void setRGBColorFillF(float red, float green, float blue)(Code)
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:
  red - the intensity of red. A value between 0 and 1
Parameters:
  green - the intensity of green. A value between 0 and 1
Parameters:
  blue - the intensity of blue. A value between 0 and 1



setRGBColorStroke
public void setRGBColorStroke(int red, int green, int blue)(Code)
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 integers between 0x00 and 0xFF.
Parameters:
  red - the intensity of red
Parameters:
  green - the intensity of green
Parameters:
  blue - the intensity of blue



setRGBColorStrokeF
public void setRGBColorStrokeF(float red, float green, float blue)(Code)
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:
  red - the intensity of red. A value between 0 and 1
Parameters:
  green - the intensity of green. A value between 0 and 1
Parameters:
  blue - the intensity of blue. A value between 0 and 1




setShadingFill
public void setShadingFill(PdfShadingPattern shading)(Code)
Sets the shading fill pattern.
Parameters:
  shading - the shading pattern



setShadingStroke
public void setShadingStroke(PdfShadingPattern shading)(Code)
Sets the shading stroke pattern
Parameters:
  shading - the shading pattern



setTextMatrix
public void setTextMatrix(float a, float b, float c, float d, float x, float y)(Code)
Changes the text matrix.

Remark: this operation also initializes the current point position.


Parameters:
  a - operand 1,1 in the matrix
Parameters:
  b - operand 1,2 in the matrix
Parameters:
  c - operand 2,1 in the matrix
Parameters:
  d - operand 2,2 in the matrix
Parameters:
  x - operand 3,1 in the matrix
Parameters:
  y - operand 3,2 in the matrix



setTextMatrix
public void setTextMatrix(float x, float y)(Code)
Changes the text matrix. The first four parameters are {1,0,0,1}.

Remark: this operation also initializes the current point position.


Parameters:
  x - operand 3,1 in the matrix
Parameters:
  y - operand 3,2 in the matrix



setTextRenderingMode
public void setTextRenderingMode(int rendering)(Code)
Sets the text rendering parameter.
Parameters:
  rendering - a parameter



setTextRise
public void setTextRise(float rise)(Code)
Sets the text rise parameter.

This allows to write text in subscript or superscript mode.


Parameters:
  rise - a parameter



setWordSpacing
public void setWordSpacing(float wordSpace)(Code)
Sets the word spacing parameter.
Parameters:
  wordSpace - a parameter



showText
public void showText(String text)(Code)
Shows the text.
Parameters:
  text - the text to write



showText
public void showText(PdfTextArray text)(Code)
Show an array of text.
Parameters:
  text - array of text



showTextAligned
public void showTextAligned(int alignment, String text, float x, float y, float rotation)(Code)
Shows text right, left or center aligned with rotation.
Parameters:
  alignment - the alignment can be ALIGN_CENTER, ALIGN_RIGHT or ALIGN_LEFT
Parameters:
  text - the text to show
Parameters:
  x - the x pivot position
Parameters:
  y - the y pivot position
Parameters:
  rotation - the rotation to be applied in degrees counterclockwise



showTextAlignedKerned
public void showTextAlignedKerned(int alignment, String text, float x, float y, float rotation)(Code)
Shows text kerned right, left or center aligned with rotation.
Parameters:
  alignment - the alignment can be ALIGN_CENTER, ALIGN_RIGHT or ALIGN_LEFT
Parameters:
  text - the text to show
Parameters:
  x - the x pivot position
Parameters:
  y - the y pivot position
Parameters:
  rotation - the rotation to be applied in degrees counterclockwise



showTextKerned
public void showTextKerned(String text)(Code)
Shows the text kerned.
Parameters:
  text - the text to write



size
int size()(Code)
Gets the size of this content. the size of the content



stroke
public void stroke()(Code)
Strokes the path.



toPdf
public byte[] toPdf(PdfWriter writer)(Code)
Returns the PDF representation of this PdfContentByte-object.
Parameters:
  writer - the PdfWriter a byte array with the representation



toString
public String toString()(Code)
Returns the String representation of this PdfContentByte-object. a String



transform
public void transform(AffineTransform af)(Code)
Concatenates a transformation to the current transformation matrix.
Parameters:
  af - the transformation



variableRectangle
public void variableRectangle(Rectangle rect)(Code)
Adds a variable width border to the current path. Only use if com.lowagie.text.Rectangle.isUseVariableBorders Rectangle.isUseVariableBorders = true.
Parameters:
  rect - a Rectangle



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.