Package com.itextpdf.text.pdf.util
Class SmartPdfSplitter
- java.lang.Object
-
- com.itextpdf.text.pdf.util.SmartPdfSplitter
-
public class SmartPdfSplitter extends java.lang.ObjectSplits a PDF based on a given file size.
-
-
Field Summary
Fields Modifier and Type Field Description protected intcurrentPageprivate LoggerLOGGERprotected 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(java.io.OutputStream os, long sizeInBytes)private longxrefLength(int size)
-
-
-
Constructor Detail
-
SmartPdfSplitter
public SmartPdfSplitter(PdfReader reader) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
hasMorePages
public boolean hasMorePages()
-
isOverSized
public boolean isOverSized()
-
split
public boolean split(java.io.OutputStream os, long sizeInBytes) throws java.io.IOException, DocumentException- Throws:
java.io.IOExceptionDocumentException
-
xrefLength
private long xrefLength(int size)
-
-