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

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

Introduction

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

Prototype

public PDPageContentStream(PDDocument doc, PDAppearanceStream appearance) throws IOException 

Source Link

Document

Create a new appearance stream.

Usage

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

License:Apache License

public void addPage() throws IOException {
    pageActual = new PDPage();
    document.addPage(pageActual);/*from   w w w  .jav a 2s .  c  om*/
    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);/*  ww w .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);//from  w  w  w  .  j a  v  a 2s  .c o m

    content = new PDPageContentStream(documento, pagina);

}