Package com.reportmill.pdf
Class PDFBuffer
- java.lang.Object
- 
- com.reportmill.base.RMObject
- 
- com.reportmill.pdf.PDFBuffer
 
 
- 
- All Implemented Interfaces:
- RMArchiver.Archiving,- java.lang.Cloneable
 - Direct Known Subclasses:
- PDFPageBuffer
 
 public class PDFBuffer extends RMObject This class is like a StringBuffer, but for creating PDF files instead of strings.
- 
- 
Constructor SummaryConstructors Constructor Description PDFBuffer()Creates an empty pdf buffer.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidappend(byte[] buf)Appends an arbitrary byte array.voidappend(byte[] buf, int off, int len)Appends an arbirary byte array with the given offset and length.voidappend(PDFBuffer aBuffer)Appends another buffer.voidcurveTo(float x1, float y1, float x2, float y2, float x3, float y3)Writes a curveto operator.intlength()Returns the current length of the buffer.voidlineTo(float x, float y)Writes a lineto operator.voidmoveTo(float x, float y)Writes a moveto operator.voidprint(char c)Adds a character to the pdf buffer.voidprint(double d)Adds a double and newline to the pdf buffer.voidprint(float f)Adds a float and newline to the pdf buffer.voidprint(int anInt)Adds an int to the pdf buffer.voidprint(RMRect aRect)Writes a rect to the pdf buffer.voidprint(java.lang.Object anObj)Adds an object to the pdf buffer.voidprint(java.lang.String aString)Adds a string to the pdf buffer.voidprintln()Adds a newline to the pdf buffer.voidprintln(int anInt)Adds an int and newline to the pdf buffer.voidprintln(RMRect aRect)Writes a rect and newline to the pdf buffer.voidprintln(java.lang.String aString)Adds a string and newline to the pdf buffer.voidprintPDFString(java.lang.String aString)Adds a string object ( a string enclosed in parentheses ) to the buffer.voidquadTo(float lastX, float lastY, float x1, float y1, float x2, float y2)Writes a quadto operator.byte[]toByteArray()Returns the buffer as a byte array.voidtransform(float a, float b, float c, float d, float tx, float ty)Writes a transform to pdf buffer.voidtransform(RMTransform aTransform)Writes a transform to pdf buffer.- 
Methods inherited from class com.reportmill.base.RMObjectclone, copy, didChange, didUndo, getAnimAttribute, getClassNameShort, initWithArchiver, undoClone, undoCopy, undoEquals
 
- 
 
- 
- 
- 
Method Detail- 
lengthpublic int length() Returns the current length of the buffer.
 - 
appendpublic void append(byte[] buf) Appends an arbitrary byte array.
 - 
appendpublic void append(byte[] buf, int off, int len)Appends an arbirary byte array with the given offset and length.
 - 
appendpublic void append(PDFBuffer aBuffer) Appends another buffer.
 - 
toByteArraypublic byte[] toByteArray() Returns the buffer as a byte array.
 - 
printlnpublic void println() Adds a newline to the pdf buffer.
 - 
printpublic void print(java.lang.Object anObj) Adds an object to the pdf buffer.
 - 
printpublic void print(char c) Adds a character to the pdf buffer.
 - 
printpublic void print(java.lang.String aString) Adds a string to the pdf buffer.
 - 
printPDFStringpublic void printPDFString(java.lang.String aString) Adds a string object ( a string enclosed in parentheses ) to the buffer. All chars above the seven bit range are represented by an octal version of the form '\ddd'. The characters '(', ')' and '\' are special characters and so must be preceded by a backslash character.
 - 
printlnpublic void println(java.lang.String aString) Adds a string and newline to the pdf buffer.
 - 
printpublic void print(int anInt) Adds an int to the pdf buffer.
 - 
printlnpublic void println(int anInt) Adds an int and newline to the pdf buffer.
 - 
printpublic void print(float f) Adds a float and newline to the pdf buffer.
 - 
printpublic void print(double d) Adds a double and newline to the pdf buffer.
 - 
printpublic void print(RMRect aRect) Writes a rect to the pdf buffer.
 - 
printlnpublic void println(RMRect aRect) Writes a rect and newline to the pdf buffer.
 - 
transformpublic void transform(RMTransform aTransform) Writes a transform to pdf buffer.
 - 
transformpublic void transform(float a, float b, float c, float d, float tx, float ty)Writes a transform to pdf buffer.
 - 
moveTopublic void moveTo(float x, float y)Writes a moveto operator.
 - 
lineTopublic void lineTo(float x, float y)Writes a lineto operator.
 - 
quadTopublic void quadTo(float lastX, float lastY, float x1, float y1, float x2, float y2)Writes a quadto operator.
 - 
curveTopublic void curveTo(float x1, float y1, float x2, float y2, float x3, float y3)Writes a curveto operator.
 
- 
 
-