Package com.reportmill.pdf
Class PDFBuffer
java.lang.Object
com.reportmill.base.RMObject
com.reportmill.pdf.PDFBuffer
- All Implemented Interfaces:
- RMArchiver.Archiving,- Cloneable
- Direct Known Subclasses:
- PDFPageBuffer
This class is like a StringBuffer, but for creating PDF files instead of strings.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidappend(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.voidAppends 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.voidWrites a rect to the pdf buffer.voidAdds an object to the pdf buffer.voidAdds 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.voidWrites a rect and newline to the pdf buffer.voidAdds a string and newline to the pdf buffer.voidprintPDFString(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[]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
- 
Constructor Details- 
PDFBufferpublic PDFBuffer()Creates an empty pdf buffer.
 
- 
- 
Method Details- 
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.
- 
appendAppends another buffer.
- 
toByteArraypublic byte[] toByteArray()Returns the buffer as a byte array.
- 
printlnpublic void println()Adds a newline to the pdf buffer.
- 
printAdds an object to the pdf buffer.
- 
printpublic void print(char c) Adds a character to the pdf buffer.
- 
printAdds a string to the pdf buffer.
- 
printPDFStringAdds 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.
- 
printlnAdds 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.
- 
printWrites a rect to the pdf buffer.
- 
printlnWrites a rect and newline to the pdf buffer.
- 
transformWrites 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.
 
-