Example usage for org.apache.pdfbox.pdmodel.common PDRectangle A6

List of usage examples for org.apache.pdfbox.pdmodel.common PDRectangle A6

Introduction

In this page you can find the example usage for org.apache.pdfbox.pdmodel.common PDRectangle A6.

Prototype

PDRectangle A6

To view the source code for org.apache.pdfbox.pdmodel.common PDRectangle A6.

Click Source Link

Document

A rectangle the size of A6 Paper.

Usage

From source file:org.fit.cssbox.render.PDFRenderer.java

License:Open Source License

/**
 * Constructor//from   w w  w . j  a v  a  2s.  c  o m
 * 
 * initialize the variables
 */
public PDFRenderer(int rootWidth, int rootHeight, OutputStream out, String pageFormat) {
    this.rootHeight = rootHeight;
    this.pathToSave = out;
    this.pageCount = 0;

    switch (pageFormat) {
    case "A0":
        this.pageFormat = PDRectangle.A0;
        break;
    case "A1":
        this.pageFormat = PDRectangle.A1;
        break;
    case "A2":
        this.pageFormat = PDRectangle.A2;
        break;
    case "A3":
        this.pageFormat = PDRectangle.A3;
        break;
    case "A4":
        this.pageFormat = PDRectangle.A4;
        break;
    case "A5":
        this.pageFormat = PDRectangle.A5;
        break;
    case "A6":
        this.pageFormat = PDRectangle.A6;
        break;
    case "LETTER":
        this.pageFormat = PDRectangle.LETTER;
        break;
    default:
        this.pageFormat = PDRectangle.A4;
        break;
    }

    initSettings(rootWidth);
}