Example usage for com.lowagie.text.rtf.document RtfDocument RtfDocument

List of usage examples for com.lowagie.text.rtf.document RtfDocument RtfDocument

Introduction

In this page you can find the example usage for com.lowagie.text.rtf.document RtfDocument RtfDocument.

Prototype

public RtfDocument() 

Source Link

Document

The default constructor for a RtfDocument

Usage

From source file:com.ainfosec.macresponse.report.RtfGenerator.java

License:Open Source License

public static void generateReport(String filename, TreeObject rootObject) {
    if ((rootObject == null) || (filename == null)) {
        return;//from w  ww.  jav a 2  s  .  c o m
    }
    try {
        document = new RtfDocument();
        document.open();
        //document.setMargins(20f, 20f, 20f, 20f);
        addMetaData("CASEID", "AUTHOR");
        addTitlePage();
        addTables(rootObject);
        addContent(rootObject);
        document.writeDocument(new FileOutputStream(filename));
    } catch (Exception e) {
        e.printStackTrace();
    }
}