SourceForge.net Logo
aXSL API 0.2

org.axsl.pdf
Interface PdfContentStream


public interface PdfContentStream

A PDF Content Stream.


Method Summary
 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.String text, boolean kern)
          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(FontUse 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).
 

Method Detail

setColor

void setColor(java.awt.Color newColor,
              boolean stroke)
Sets either the stroke or "other" (fill) color (and color space) in the graphics state.

Parameters:
newColor - The new color.
stroke - Set to true to set the stroke color, false to set the "other" (fill) color.

setLineCapStyle

void setLineCapStyle(PdfLineCapStyle newLineCapStyle)
Sets the line cap style in the graphics state.

Parameters:
newLineCapStyle - The new line cap style.

setLineWidth

void setLineWidth(float width)
Sets the width of paths to be stroked in the current graphics state.

Parameters:
width - The new width, in user space units, at which paths should be stroked.

setDashPattern

void setDashPattern(float[] dashArray,
                    float dashPhase)
Sets the dash pattern in the graphics state.

Parameters:
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.

setCursor

void setCursor(float originX,
               float originY)
Sets the location of the cursor.

Parameters:
originX - The new X (horizontal) coordinate of the cursor, in points.
originY - The new Y (vertical) coordinate of the cursor, in points.

setCharacterSpacing

void setCharacterSpacing(float newCharacterSpacing)
Sets the character spacing (a text state parameter).

Parameters:
newCharacterSpacing - The new character spacing, in points.

setWordSpacing

void setWordSpacing(float newWordSpacing)
Sets the word spacing (a text state parameter).

Parameters:
newWordSpacing - The new word spacing, in points.

setHorizontalScaling

void setHorizontalScaling(float newHorizontalScaling)
Sets the horizontal scaling percentage (a text state parameter).

Parameters:
newHorizontalScaling - The percentage of the normal width at which text should be rendered.

setLeading

void setLeading(float newLeading)
Sets the text leading (a text state parameter).

Parameters:
newLeading - The new text leading value, expressed in unscaled text space units.

setFont

void setFont(FontUse newFont,
             float newFontSize)
Sets the font and font size (text state parameters).

Parameters:
newFont - The new font.
newFontSize - The new font size.

setTextRenderingMode

void setTextRenderingMode(PdfTextRenderingMode newTextRenderingMode)
Sets the text rendering mode (a text state parameter).

Parameters:
newTextRenderingMode - The new text rendering mode.

setTextRise

void setTextRise(float newTextRise)
Sets the text rise (a text state parameter).

Parameters:
newTextRise - The new text rise value, expressed in unscaled text space units.

setTextKnockout

void setTextKnockout(boolean newTextKnockout)
Sets the text knockout flag (a text state parameter).

Parameters:
newTextKnockout - The new text knockout value.

drawText

void drawText(java.lang.String text,
              boolean kern)
Draws text at the current location in the content stream.

Parameters:
text - The text to be written into the stream.
kern - Indicates whether this text should be kerned or not.

drawLine

void drawLine(java.awt.geom.Line2D.Float line)
Draws a line at the current location in the content stream.

Parameters:
line - The line to be drawn.

drawRectangle

void drawRectangle(java.awt.geom.Rectangle2D.Float rectangle,
                   boolean stroke,
                   boolean fill)
Draws a rectangle at the current location in the content stream.

Parameters:
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.

drawGraphic

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.

Parameters:
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.

close

void close()
Closes any open logical structures in the content so that it is ready to be output.


SourceForge.net Logo
aXSL API 0.2

This documentation was created August 8 2007 by The aXSL Group and may be freely copied. See license for details.