public interface PdfContentStream
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes any open logical structures in the content so that it is ready
to be output.
|
void |
drawGraphic(Graphic graphic,
java.awt.geom.Rectangle2D.Float contentRectangle,
java.awt.geom.Rectangle2D.Float clipRectangle,
FontConsumer fontConsumer,
boolean strokeText)
Draws a graphic in the content stream.
|
void |
drawLine(java.awt.geom.Line2D.Float line)
Draws a line at the current location in the content stream.
|
void |
drawRectangle(java.awt.geom.Rectangle2D.Float rectangle,
boolean stroke,
boolean fill)
Draws a rectangle at the current location in the content stream.
|
void |
drawText(java.lang.CharSequence text,
FontOptions fontOptions,
Orthography orthography)
Draws text at the current location in the content stream.
|
void |
setCharacterSpacing(float newCharacterSpacing)
Sets the character spacing (a text state parameter).
|
void |
setColor(java.awt.Color newColor,
boolean stroke)
Sets either the stroke or "other" (fill) color (and color space) in the
graphics state.
|
void |
setCursor(float originX,
float originY)
Sets the location of the cursor.
|
void |
setDashPattern(float[] dashArray,
float dashPhase)
Sets the dash pattern in the graphics state.
|
void |
setFont(PdfFont newFont,
float newFontSize)
Sets the font and font size (text state parameters).
|
void |
setHorizontalScaling(float newHorizontalScaling)
Sets the horizontal scaling percentage (a text state parameter).
|
void |
setLeading(float newLeading)
Sets the text leading (a text state parameter).
|
void |
setLineCapStyle(PdfLineCapStyle newLineCapStyle)
Sets the line cap style in the graphics state.
|
void |
setLineWidth(float width)
Sets the width of paths to be stroked in the current graphics state.
|
void |
setTextKnockout(boolean newTextKnockout)
Sets the text knockout flag (a text state parameter).
|
void |
setTextRenderingMode(PdfTextRenderingMode newTextRenderingMode)
Sets the text rendering mode (a text state parameter).
|
void |
setTextRise(float newTextRise)
Sets the text rise (a text state parameter).
|
void |
setWordSpacing(float newWordSpacing)
Sets the word spacing (a text state parameter).
|
void setColor(java.awt.Color newColor,
boolean stroke)
throws PdfException
newColor - The new color.stroke - Set to true to set the stroke color, false to set the
"other" (fill) color.PdfException - For errors while setting the value.void setLineCapStyle(PdfLineCapStyle newLineCapStyle) throws PdfException
newLineCapStyle - The new line cap style.PdfException - For errors while setting the value.void setLineWidth(float width)
throws PdfException
width - The new width, in user space units, at which paths should be
stroked.PdfException - For errors while setting the value.void setDashPattern(float[] dashArray,
float dashPhase)
throws PdfException
dashArray - The dash array to be used for drawing this line.
See the PDF Documentation for information about this array.dashPhase - The dash phase to be used for drawing this line.
See the PDF Documentation for information about this value.PdfException - For errors while setting the value.void setCursor(float originX,
float originY)
throws PdfException
originX - The new X (horizontal) coordinate of the cursor, in
points.originY - The new Y (vertical) coordinate of the cursor, in points.PdfException - For errors while setting the value.void setCharacterSpacing(float newCharacterSpacing)
throws PdfException
newCharacterSpacing - The new character spacing, in points.PdfException - For errors while setting the value.void setWordSpacing(float newWordSpacing)
throws PdfException
newWordSpacing - The new word spacing, in points.PdfException - For errors while setting the value.void setHorizontalScaling(float newHorizontalScaling)
throws PdfException
newHorizontalScaling - The percentage of the normal width at which
text should be rendered.PdfException - For errors while setting the value.void setLeading(float newLeading)
throws PdfException
newLeading - The new text leading value, expressed in unscaled text
space units.PdfException - For errors while setting the value.void setFont(PdfFont newFont, float newFontSize) throws PdfException
newFont - The new font.newFontSize - The new font size.PdfException - For errors while setting the value.void setTextRenderingMode(PdfTextRenderingMode newTextRenderingMode) throws PdfException
newTextRenderingMode - The new text rendering mode.PdfException - For errors while setting the value.void setTextRise(float newTextRise)
throws PdfException
newTextRise - The new text rise value, expressed in unscaled text
space units.PdfException - For errors while setting the value.void setTextKnockout(boolean newTextKnockout)
throws PdfException
newTextKnockout - The new text knockout value.PdfException - For errors while setting the value.void drawText(java.lang.CharSequence text,
FontOptions fontOptions,
Orthography orthography)
throws PdfException
text - The text to be written into the stream.fontOptions - The font options, such as ligatures and small-caps that should be used when computing the
glyphs for this word.orthography - The orthography that should be used when applying font features like subsitutions.PdfException - For errors during drawing.void drawLine(java.awt.geom.Line2D.Float line)
throws PdfException
line - The line to be drawn.PdfException - For errors during drawing.void drawRectangle(java.awt.geom.Rectangle2D.Float rectangle,
boolean stroke,
boolean fill)
throws PdfException
rectangle - The rectangle to be drawn.stroke - Indicates whether the rectangle should be stroked, using
the current graphics state parameters.fill - Indicates whether the rectangle should be filled, using the
current graphics state parameters.PdfException - For errors during drawing.void drawGraphic(Graphic graphic, java.awt.geom.Rectangle2D.Float contentRectangle, java.awt.geom.Rectangle2D.Float clipRectangle, FontConsumer fontConsumer, boolean strokeText) throws PdfException
contentRectangle - The rectangle for the content.clipRectangle - The rectangle to which the content rectangle should
be clipped.graphic - The Graphic which should be drawn.fontConsumer - The FontConsumer which should be used to resolve
fonts. This is needed for some vector-based graphics like SVG or EPS that
can draw text.strokeText - Indicates whether text should be stroked. If this is
set to "true" text will drawn as a set of paths instead of referencing a
font that contains those paths.PdfException - For errors while setting the value.void close()
throws PdfException
PdfException - For errors while closing the content stream.This documentation was created 2017-01-24 at 21:26 GMT by The aXSL Group and may be freely copied. See license for details.