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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
append
(byte[] buf) Appends an arbitrary byte array.void
append
(byte[] buf, int off, int len) Appends an arbirary byte array with the given offset and length.void
Appends another buffer.void
curveTo
(float x1, float y1, float x2, float y2, float x3, float y3) Writes a curveto operator.int
length()
Returns the current length of the buffer.void
lineTo
(float x, float y) Writes a lineto operator.void
moveTo
(float x, float y) Writes a moveto operator.void
print
(char c) Adds a character to the pdf buffer.void
print
(double d) Adds a double and newline to the pdf buffer.void
print
(float f) Adds a float and newline to the pdf buffer.void
print
(int anInt) Adds an int to the pdf buffer.void
Writes a rect to the pdf buffer.void
Adds an object to the pdf buffer.void
Adds a string to the pdf buffer.void
println()
Adds a newline to the pdf buffer.void
println
(int anInt) Adds an int and newline to the pdf buffer.void
Writes a rect and newline to the pdf buffer.void
Adds a string and newline to the pdf buffer.void
printPDFString
(String aString) Adds a string object ( a string enclosed in parentheses ) to the buffer.void
quadTo
(float lastX, float lastY, float x1, float y1, float x2, float y2) Writes a quadto operator.byte[]
Returns the buffer as a byte array.void
transform
(float a, float b, float c, float d, float tx, float ty) Writes a transform to pdf buffer.void
transform
(RMTransform aTransform) Writes a transform to pdf buffer.Methods inherited from class com.reportmill.base.RMObject
clone, copy, didChange, didUndo, getAnimAttribute, getClassNameShort, initWithArchiver, undoClone, undoCopy, undoEquals
-
Constructor Details
-
PDFBuffer
public PDFBuffer()Creates an empty pdf buffer.
-
-
Method Details
-
length
public int length()Returns the current length of the buffer. -
append
public void append(byte[] buf) Appends an arbitrary byte array. -
append
public void append(byte[] buf, int off, int len) Appends an arbirary byte array with the given offset and length. -
append
Appends another buffer. -
toByteArray
public byte[] toByteArray()Returns the buffer as a byte array. -
println
public void println()Adds a newline to the pdf buffer. -
print
Adds an object to the pdf buffer. -
print
public void print(char c) Adds a character to the pdf buffer. -
print
Adds a string to the pdf buffer. -
printPDFString
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. -
println
Adds a string and newline to the pdf buffer. -
print
public void print(int anInt) Adds an int to the pdf buffer. -
println
public void println(int anInt) Adds an int and newline to the pdf buffer. -
print
public void print(float f) Adds a float and newline to the pdf buffer. -
print
public void print(double d) Adds a double and newline to the pdf buffer. -
print
Writes a rect to the pdf buffer. -
println
Writes a rect and newline to the pdf buffer. -
transform
Writes a transform to pdf buffer. -
transform
public void transform(float a, float b, float c, float d, float tx, float ty) Writes a transform to pdf buffer. -
moveTo
public void moveTo(float x, float y) Writes a moveto operator. -
lineTo
public void lineTo(float x, float y) Writes a lineto operator. -
quadTo
public void quadTo(float lastX, float lastY, float x1, float y1, float x2, float y2) Writes a quadto operator. -
curveTo
public void curveTo(float x1, float y1, float x2, float y2, float x3, float y3) Writes a curveto operator.
-