public class PDFWriter
extends java.lang.Object
PDFWriter w = new PDFWriter("merge.pdf");
w.appendPDF("file1.pdf");
w.appendPDF("file2.pdf");
w.appendDocument( de.vc.jfo.Document doc );
w.close(); // very important!
| Constructor and Description |
|---|
PDFWriter(java.io.OutputStream pdfOutput)
Creates a new PDF writer that are merges documents to one large PDF.
|
PDFWriter(java.io.OutputStream pdfOutput,
boolean startOnOddPageNumber)
Creates a new PDF writer that are merges documents to one large PDF.
|
PDFWriter(java.lang.String pdfOutputFile)
Creates a new PDF writer that are merges documents to one large PDF.
|
PDFWriter(java.lang.String pdfOutputFile,
boolean startOnOddPageNumber)
Creates a new PDF writer that are merges documents to one large PDF.
|
| Modifier and Type | Method and Description |
|---|---|
void |
appendDocument(Document document)
Appends an XSL-FO document to the PDF output.
|
void |
appendPDF(byte[] pdfFile)
Appends an existing PDF file to the PDF output.
|
void |
appendPDF(java.lang.String pdfFile)
Appends an existing PDF file to the PDF output.
|
void |
appendPDF(java.net.URL pdfFile)
Appends an existing PDF file to the PDF output.
|
void |
close()
Closes this writer and the output stream of the PDF target.
|
int |
getTotalNumberOfPages()
Gets the total number of pages that were written into the PDF stream.
|
void |
setRenderer(Renderer renderer)
Sets the renderer that is used to render XSL-FO Documents.
|
void |
write(Document document)
Deprecated.
Use appendDocument.
|
public PDFWriter(java.lang.String pdfOutputFile)
throws java.io.FileNotFoundException
pdfOutputFile - Output PDF file.java.io.FileNotFoundExceptionpublic PDFWriter(java.lang.String pdfOutputFile,
boolean startOnOddPageNumber)
throws java.io.FileNotFoundException
pdfOutputFile - Output PDF file.startOnOddPageNumber - Start each document on an odd page number (eg for duplex printing).java.io.FileNotFoundExceptionpublic PDFWriter(java.io.OutputStream pdfOutput)
pdfOutput - Stream to merged PDF.public PDFWriter(java.io.OutputStream pdfOutput,
boolean startOnOddPageNumber)
pdfOutput - Stream to merged PDF.startOnOddPageNumber - Start each document on an odd page number (eg for duplex printing).public void setRenderer(Renderer renderer)
renderer - RendererappendDocument(de.vc.jfo.Document)public void appendPDF(byte[] pdfFile)
throws java.io.IOException
pdfFile - PDF file in array (e.g. from database).java.io.IOExceptionpublic void appendPDF(java.net.URL pdfFile)
throws java.io.IOException
pdfFile - URL of PDF file.java.io.IOExceptionpublic void appendPDF(java.lang.String pdfFile)
throws java.io.IOException
pdfFile - Path to PDF file.java.io.IOExceptionpublic void appendDocument(Document document) throws java.io.IOException
document - Documentjava.io.IOExceptionsetRenderer(Renderer)public void write(Document document) throws java.io.IOException
document - Documentjava.io.IOExceptionpublic void close()
throws java.io.IOException
java.io.IOExceptionpublic int getTotalNumberOfPages()
© 2003-2011 by Sascha Schmidt (vision-cloud.de). All Rights Reserved.