Package com.itextpdf.text.pdf.util
Class SmartPdfSplitter
- java.lang.Object
-
- com.itextpdf.text.pdf.util.SmartPdfSplitter
-
public class SmartPdfSplitter extends Object
Splits a PDF based on a given file size.
-
-
Field Summary
Fields Modifier and Type Field Description protected intcurrentPageprotected intnumberOfPagesprotected booleanoverSizedprotected PdfReaderreader
-
Constructor Summary
Constructors Constructor Description SmartPdfSplitter(PdfReader reader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasMorePages()booleanisOverSized()booleansplit(OutputStream os, long sizeInBytes)
-
-
-
Field Detail
-
reader
protected PdfReader reader
-
numberOfPages
protected int numberOfPages
-
currentPage
protected int currentPage
-
overSized
protected boolean overSized
-
-
Constructor Detail
-
SmartPdfSplitter
public SmartPdfSplitter(PdfReader reader) throws IOException
- Throws:
IOException
-
-
Method Detail
-
hasMorePages
public boolean hasMorePages()
-
isOverSized
public boolean isOverSized()
-
split
public boolean split(OutputStream os, long sizeInBytes) throws IOException, DocumentException
- Throws:
IOExceptionDocumentException
-
-