org.pdfsam.console.business.pdf.writers
Class PdfSimpleConcatenator

java.lang.Object
  extended by org.pdfsam.console.business.pdf.writers.PdfSimpleConcatenator
All Implemented Interfaces:
PdfConcatenator

public class PdfSimpleConcatenator
extends java.lang.Object
implements PdfConcatenator

Simple concatenator. Uses PdfCopy.

Author:
a.vacondio

Constructor Summary
PdfSimpleConcatenator(com.lowagie.text.Document document, java.io.OutputStream os)
           
PdfSimpleConcatenator(com.lowagie.text.Document document, java.io.OutputStream os, boolean compressed)
           
 
Method Summary
 void addDocument(com.lowagie.text.pdf.PdfReader reader)
          Concatenates a PDF document.
 void addDocument(com.lowagie.text.pdf.PdfReader reader, java.lang.String ranges)
          Concatenates a PDF document selecting the pages to keep.
 void close()
          close
 void freeReader(com.lowagie.text.pdf.PdfReader reader)
           
 void setOutlines(java.util.List outlines)
          Sets the bookmarks
 void setPdfVersion(char pdfVersion)
          Sets the output document pdf version
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PdfSimpleConcatenator

public PdfSimpleConcatenator(com.lowagie.text.Document document,
                             java.io.OutputStream os)
                      throws com.lowagie.text.DocumentException
Throws:
com.lowagie.text.DocumentException

PdfSimpleConcatenator

public PdfSimpleConcatenator(com.lowagie.text.Document document,
                             java.io.OutputStream os,
                             boolean compressed)
                      throws com.lowagie.text.DocumentException
Parameters:
document -
os -
compressed - If true creates a compressed pdf document
Throws:
com.lowagie.text.DocumentException
Method Detail

addDocument

public void addDocument(com.lowagie.text.pdf.PdfReader reader,
                        java.lang.String ranges)
                 throws java.lang.Exception
Description copied from interface: PdfConcatenator
Concatenates a PDF document selecting the pages to keep. The pages are described as ranges.

Specified by:
addDocument in interface PdfConcatenator
Parameters:
reader - PdfReader
ranges - Pages range (Ex. 2-23)
Throws:
java.lang.Exception

addDocument

public void addDocument(com.lowagie.text.pdf.PdfReader reader)
                 throws java.lang.Exception
Description copied from interface: PdfConcatenator
Concatenates a PDF document.

Specified by:
addDocument in interface PdfConcatenator
Throws:
java.lang.Exception

freeReader

public void freeReader(com.lowagie.text.pdf.PdfReader reader)
                throws java.lang.Exception
Specified by:
freeReader in interface PdfConcatenator
Throws:
java.lang.Exception

setOutlines

public void setOutlines(java.util.List outlines)
Description copied from interface: PdfConcatenator
Sets the bookmarks

Specified by:
setOutlines in interface PdfConcatenator

close

public void close()
Description copied from interface: PdfConcatenator
close

Specified by:
close in interface PdfConcatenator

setPdfVersion

public void setPdfVersion(char pdfVersion)
Description copied from interface: PdfConcatenator
Sets the output document pdf version

Specified by:
setPdfVersion in interface PdfConcatenator