com.java4less.rreport
Class PDFLayer
java.lang.Object
|
+--com.java4less.rreport.PDFLayer
- All Implemented Interfaces:
- ExportLayer
- public class PDFLayer
- extends java.lang.Object
- implements ExportLayer
this class is used by RReport for exporting to PDF. RReport calls the print() method in order to create the PDF code for all objects in the report.
This class using the PDF Library called iText. You can download it here: http://www.lowagie.com/iText
After downloading it you must copy iText.jar to RReport's directory and make sure it is included in your classpath.
Constructor Summary |
PDFLayer(java.lang.String file,
java.io.OutputStream os,
int w,
int h,
java.lang.String title)
initializes layer and the pdf document with the given size. |
Method Summary |
void |
close()
close Document |
java.lang.String |
getName()
get name of this layer |
void |
newPage()
forces a new page in the PDF document |
void |
print(RObject o,
double x,
double y,
java.lang.Object Value)
add object to the PDF Document at the given position. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
fontsDirectory
public static java.lang.String fontsDirectory
PDFLayer
public PDFLayer(java.lang.String file,
java.io.OutputStream os,
int w,
int h,
java.lang.String title)
throws java.lang.Exception
- initializes layer and the pdf document with the given size.
getName
public java.lang.String getName()
- get name of this layer
- Specified by:
getName
in interface ExportLayer
newPage
public void newPage()
throws java.lang.Exception
- forces a new page in the PDF document
- Specified by:
newPage
in interface ExportLayer
close
public void close()
- close Document
- Specified by:
close
in interface ExportLayer
print
public void print(RObject o,
double x,
double y,
java.lang.Object Value)
- add object to the PDF Document at the given position.
- Specified by:
print
in interface ExportLayer