|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.foray.pdf.object.PDFObject
org.foray.pdf.object.PDFStream
org.foray.pdf.object.PDFContentStream
public class PDFContentStream
Specialized version of PDFStream with methods useful in creating PDF content streams.
Field Summary |
---|
Fields inherited from class org.foray.pdf.object.PDFObject |
---|
EOL, MSG_EOL, XREF_EOL |
Constructor Summary | |
---|---|
PDFContentStream(PDFDocument doc)
Create a PDFContentStream. |
Method Summary | |
---|---|
void |
close()
|
void |
closeTextObject()
Closes any open text object. |
void |
drawGraphic(org.axsl.graphic.Graphic image,
Rectangle2D.Float contentRectangle,
Rectangle2D.Float clipRectangle,
org.axsl.font.FontConsumer fontConsumer,
boolean strokeText)
|
void |
drawLine(Line2D.Float line)
|
void |
drawRectangle(Rectangle2D.Float rectangle,
boolean stroke,
boolean fill)
|
void |
drawText(CharSequence text,
org.axsl.font.FontOptions fontOptions,
org.axsl.common.i18n.Orthography orthography)
|
protected void |
finalizeStreamContent()
This method is an explicit opportunity for subclasses to finish writing whatever content may still need to be written to the stream before the dictionary and stream contents are written. |
void |
openTextObject()
Makes the stream ready to accept text manipulation operators. |
void |
setCharacterSpacing(float newCharacterSpacing)
|
void |
setColor(Color newColor,
boolean stroke)
|
void |
setCursor(float originX,
float originY)
|
void |
setDashPattern(float[] dashArray,
float dashPhase)
|
void |
setFont(org.axsl.pdf.PdfFont newFont,
float newFontSize)
|
void |
setHorizontalScaling(float newHorizontalScaling)
|
void |
setLeading(float newLeading)
|
void |
setLineCapStyle(org.axsl.pdf.PdfLineCapStyle newLineCapStyle)
|
void |
setLineWidth(float width)
|
void |
setTextKnockout(boolean newTextKnockout)
|
void |
setTextRenderingMode(org.axsl.pdf.PdfTextRenderingMode newTextRenderingMode)
|
void |
setTextRise(float newTextRise)
|
void |
setWordSpacing(float newWordSpacing)
|
protected String |
specialStreamDictEntries()
Subclasses return any specialized dictionary entries here, so that they are included when writing the stream dictionary. |
Methods inherited from class org.foray.pdf.object.PDFStream |
---|
add, addDefaultFilters, addEncryption, addFilter, addFilter, applyFilters, getDataLength, getOutputStream, output, outputStreamData, setData, setOutputStream, toPDF |
Methods inherited from class org.foray.pdf.object.PDFObject |
---|
bufferToByteArray, byteArrayToStream, getCharsPerLine, getGeneration, getLogger, getNumber, getPDFDocument, pdfID, pdfReference, setNumber, stringToByteArray |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PDFContentStream(PDFDocument doc)
doc
- The parent PDF document.Method Detail |
---|
public void close() throws org.axsl.pdf.PdfException
close
in interface org.axsl.pdf.PdfContentStream
org.axsl.pdf.PdfException
public void openTextObject() throws org.axsl.pdf.PdfException
org.axsl.pdf.PdfException
- For errors writing the content.public void closeTextObject() throws org.axsl.pdf.PdfException
org.axsl.pdf.PdfException
- For errors writing the content.public void setCursor(float originX, float originY) throws org.axsl.pdf.PdfException
setCursor
in interface org.axsl.pdf.PdfContentStream
org.axsl.pdf.PdfException
public void drawText(CharSequence text, org.axsl.font.FontOptions fontOptions, org.axsl.common.i18n.Orthography orthography) throws org.axsl.pdf.PdfException
drawText
in interface org.axsl.pdf.PdfContentStream
org.axsl.pdf.PdfException
public void setFont(org.axsl.pdf.PdfFont newFont, float newFontSize) throws org.axsl.pdf.PdfException
setFont
in interface org.axsl.pdf.PdfContentStream
org.axsl.pdf.PdfException
public void setColor(Color newColor, boolean stroke) throws org.axsl.pdf.PdfException
setColor
in interface org.axsl.pdf.PdfContentStream
org.axsl.pdf.PdfException
public void setWordSpacing(float newWordSpacing) throws org.axsl.pdf.PdfException
setWordSpacing
in interface org.axsl.pdf.PdfContentStream
org.axsl.pdf.PdfException
public void setCharacterSpacing(float newCharacterSpacing) throws org.axsl.pdf.PdfException
setCharacterSpacing
in interface org.axsl.pdf.PdfContentStream
org.axsl.pdf.PdfException
public void setHorizontalScaling(float newHorizontalScaling) throws org.axsl.pdf.PdfException
setHorizontalScaling
in interface org.axsl.pdf.PdfContentStream
org.axsl.pdf.PdfException
public void setLeading(float newLeading) throws org.axsl.pdf.PdfException
setLeading
in interface org.axsl.pdf.PdfContentStream
org.axsl.pdf.PdfException
public void setTextRenderingMode(org.axsl.pdf.PdfTextRenderingMode newTextRenderingMode) throws org.axsl.pdf.PdfException
setTextRenderingMode
in interface org.axsl.pdf.PdfContentStream
org.axsl.pdf.PdfException
public void setTextRise(float newTextRise) throws org.axsl.pdf.PdfException
setTextRise
in interface org.axsl.pdf.PdfContentStream
org.axsl.pdf.PdfException
public void setTextKnockout(boolean newTextKnockout)
setTextKnockout
in interface org.axsl.pdf.PdfContentStream
public void setLineCapStyle(org.axsl.pdf.PdfLineCapStyle newLineCapStyle) throws org.axsl.pdf.PdfException
setLineCapStyle
in interface org.axsl.pdf.PdfContentStream
org.axsl.pdf.PdfException
public void drawLine(Line2D.Float line) throws org.axsl.pdf.PdfException
drawLine
in interface org.axsl.pdf.PdfContentStream
org.axsl.pdf.PdfException
public void drawRectangle(Rectangle2D.Float rectangle, boolean stroke, boolean fill) throws org.axsl.pdf.PdfException
drawRectangle
in interface org.axsl.pdf.PdfContentStream
org.axsl.pdf.PdfException
public void drawGraphic(org.axsl.graphic.Graphic image, Rectangle2D.Float contentRectangle, Rectangle2D.Float clipRectangle, org.axsl.font.FontConsumer fontConsumer, boolean strokeText) throws org.axsl.pdf.PdfException
drawGraphic
in interface org.axsl.pdf.PdfContentStream
org.axsl.pdf.PdfException
public void setLineWidth(float width) throws org.axsl.pdf.PdfException
setLineWidth
in interface org.axsl.pdf.PdfContentStream
org.axsl.pdf.PdfException
public void setDashPattern(float[] dashArray, float dashPhase) throws org.axsl.pdf.PdfException
setDashPattern
in interface org.axsl.pdf.PdfContentStream
org.axsl.pdf.PdfException
protected void finalizeStreamContent()
PDFStream
finalizeStreamContent
in class PDFStream
protected String specialStreamDictEntries()
PDFStream
specialStreamDictEntries
in class PDFStream
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |