Example usage for com.lowagie.text FontFactory TIMES_ROMAN

List of usage examples for com.lowagie.text FontFactory TIMES_ROMAN

Introduction

In this page you can find the example usage for com.lowagie.text FontFactory TIMES_ROMAN.

Prototype

String TIMES_ROMAN

To view the source code for com.lowagie.text FontFactory TIMES_ROMAN.

Click Source Link

Document

This is a possible value of a base 14 type 1 font

Usage

From source file:uk.ac.ox.oucs.vle.resources.PDFWriter.java

License:Educational Community License

/**
 * Create a new attendance PDF writer/* www. j  a v a2  s .  c o m*/
 * @param out The outputstream to write the PDF to.
 * @throws IOException If there is a problem writing to the outputstream.
 */
public PDFWriter(OutputStream out) throws IOException {

    document = new Document();
    try {
        pdfWriter = PdfWriter.getInstance(document, out);
        pdfWriter.setStrictImageSequence(true);
        document.open();

        tableHeadFont = FontFactory.getFont(FontFactory.TIMES_ROMAN, 12, Font.NORMAL);
        tableNameFont = FontFactory.getFont(FontFactory.TIMES_ROMAN, 11, Font.NORMAL);
        tableOtherFont = FontFactory.getFont(FontFactory.TIMES_ROMAN, 9, Font.NORMAL);
        titleFont = FontFactory.getFont(FontFactory.TIMES_ROMAN, 18, Font.NORMAL);
        authorFont = FontFactory.getFont(FontFactory.TIMES_ROMAN, 12, Font.NORMAL);
        infoFont = FontFactory.getFont(FontFactory.TIMES_ROMAN, 12, Font.NORMAL);

    } catch (Exception e) {
        throw new IOException("Unable to start PDF Report");
    }
}