org.pdfbox.util
Class Splitter

java.lang.Object
  extended byorg.pdfbox.util.Splitter

public class Splitter
extends Object

Split a document into several other documents.

Version:
$Revision: 1.6 $
Author:
Mario Ivankovits (mario@ops.co.at), Ben Litchfield (ben@benlitchfield.com)

Constructor Summary
Splitter()
           
 
Method Summary
 int getSplitAtPage()
          This will return how many pages each split document will contain.
 void setSplitAtPage(int split)
          This will tell the splitting algorithm where to split the pages.
 List split(PDDocument document)
          This will take a document and split into several other documents.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Splitter

public Splitter()
Method Detail

split

public List split(PDDocument document)
           throws IOException
This will take a document and split into several other documents.

Parameters:
document - The document to split.
Returns:
A list of all the split documents.
Throws:
IOException - If there is an IOError

setSplitAtPage

public void setSplitAtPage(int split)
This will tell the splitting algorithm where to split the pages. The default is 1, so every page will become a new document. If it was to then each document would contain 2 pages. So it the source document had 5 pages it would split into 3 new documents, 2 documents containing 2 pages and 1 document containing one page.

Parameters:
split - The number of pages each split document should contain.

getSplitAtPage

public int getSplitAtPage()
This will return how many pages each split document will contain.

Returns:
The split parameter.


Copyright null EGIZ - E-Government Innovation Center. All Rights Reserved.