Example usage for org.apache.pdfbox.pdmodel PDPage PDPage

List of usage examples for org.apache.pdfbox.pdmodel PDPage PDPage

Introduction

In this page you can find the example usage for org.apache.pdfbox.pdmodel PDPage PDPage.

Prototype

public PDPage() 

Source Link

Document

Creates a new PDPage instance for embedding, with a size of U.S.

Usage

From source file:uk.org.openeyes.PDFFunctions.java

/**
 *
 * @param pageNum//from ww  w .  j av a 2 s. c  om
 * @return
 */
public PDPage getPDFPage(int pageNum) {
    PDPage outPage = new PDPage();
    PDPageTree allPages;

    if (!PDFDoc.equals(null)) {
        allPages = this.PDFDoc.getDocumentCatalog().getPages();
        outPage = allPages.get(pageNum);
    }
    return outPage;
}

From source file:ve.zoonosis.utils.PDFCreator.java

License:Apache License

public void addPage() throws IOException {
    pageActual = new PDPage();
    document.addPage(pageActual);/*w ww .j  av  a  2 s .c o m*/
    contentStream = new PDPageContentStream(document, pageActual);
    linePos = 1;
}

From source file:ve.zoonosis.utils.PDFCreator.java

License:Apache License

public void clearPage() throws IOException {
    if (pageActual != null) {
        document.removePage(pageActual);
        pageActual = new PDPage();
        document.addPage(pageActual);/* w  ww . j a v a  2 s. co m*/
        contentStream = new PDPageContentStream(document, pageActual);
        linePos = 1;
    }
}

From source file:Vista.AdminReportes.java

private void crearArchivoPDF(String tipo) throws IOException {
    nombreArchivo = "Reporte" + tipo + getReporteID() + ".pdf";

    documento = new PDDocument();
    pagina = new PDPage();

    documento.addPage(pagina);/*w w w . j a v a2  s.c o  m*/

    content = new PDPageContentStream(documento, pagina);

}