iText 8.0.2 API
iText.Kernel.Utils.PdfSplitter Class Reference

Classes

interface   IDocumentReadyListener
 

Public Member Functions

  PdfSplitter (PdfDocument pdfDocument)
  Creates a new instance of PdfSplitter class. More...
 
virtual void  SetEventCountingMetaInfo (IMetaInfo metaInfo)
  Sets the iText.Commons.Actions.Contexts.IMetaInfo that will be used during iText.Kernel.Pdf.PdfDocument creation. More...
 
virtual void  SetPreserveTagged (bool preserveTagged)
  If original document is tagged, then by default all resultant document will also be tagged. More...
 
virtual void  SetPreserveOutlines (bool preserveOutlines)
  If original document has outlines, then by default all resultant document will also have outlines. More...
 
virtual IList< PdfDocument SplitBySize (long size)
  Splits the document basing on the given size specified in bytes. More...
 
virtual void  SplitByPageNumbers (IList< int > pageNumbers, PdfSplitter.IDocumentReadyListener documentReady)
  Splits the document by page numbers. More...
 
virtual IList< PdfDocument SplitByPageNumbers (IList< int > pageNumbers)
  Splits the document by page numbers. More...
 
virtual void  SplitByPageCount (int pageCount, PdfSplitter.IDocumentReadyListener documentReady)
  Splits a document into smaller documents with no more than @pageCount pages each. More...
 
virtual IList< PdfDocument SplitByPageCount (int pageCount)
  Splits a document into smaller documents with no more than @pageCount pages each. More...
 
virtual IList< PdfDocument ExtractPageRanges (IList< PageRange > pageRanges)
  Extracts the specified page ranges from a document. More...
 
virtual PdfDocument  ExtractPageRange (PageRange pageRange)
  Extracts the specified page ranges from a document. More...
 
virtual PdfDocument  GetPdfDocument ()
 
virtual IList< PdfDocument SplitByOutlines (IList< String > outlineTitles)
  Split a document by outline title (bookmark name), find outline by name and places the entire hierarchy in a separate document ( outlines and pages ) . More...
 

Constructor & Destructor Documentation

◆ PdfSplitter()

iText.Kernel.Utils.PdfSplitter.PdfSplitter ( PdfDocument  pdfDocument )
inline

Creates a new instance of PdfSplitter class.

Parameters
pdfDocument the document to be split.

Member Function Documentation

◆ ExtractPageRange()

virtual PdfDocument iText.Kernel.Utils.PdfSplitter.ExtractPageRange ( PageRange  pageRange )
inlinevirtual

Extracts the specified page ranges from a document.

Parameters
pageRange the page range to be extracted from the document.
Returns
the resultant document containing the pages specified by the provided page range. Be warned that this document is not closed.

◆ ExtractPageRanges()

virtual IList<PdfDocument> iText.Kernel.Utils.PdfSplitter.ExtractPageRanges ( IList< PageRange pageRanges )
inlinevirtual

Extracts the specified page ranges from a document.

Parameters
pageRanges the list of page ranges for each of the resultant document.
Returns
the list of the resultant documents for each of the specified page range. Be warned that these documents are not closed.

◆ SetEventCountingMetaInfo()

virtual void iText.Kernel.Utils.PdfSplitter.SetEventCountingMetaInfo ( IMetaInfo  metaInfo )
inlinevirtual

Sets the iText.Commons.Actions.Contexts.IMetaInfo that will be used during iText.Kernel.Pdf.PdfDocument creation.

Parameters
metaInfo meta info to set

◆ SetPreserveOutlines()

virtual void iText.Kernel.Utils.PdfSplitter.SetPreserveOutlines ( bool  preserveOutlines )
inlinevirtual

If original document has outlines, then by default all resultant document will also have outlines.

If original document has outlines, then by default all resultant document will also have outlines. This could be changed with this flag - if set to false, resultant documents won't contain outlines, even if original document had them.

Parameters
preserveOutlines defines whether the resultant documents will preserve outlines or not

◆ SetPreserveTagged()

virtual void iText.Kernel.Utils.PdfSplitter.SetPreserveTagged ( bool  preserveTagged )
inlinevirtual

If original document is tagged, then by default all resultant document will also be tagged.

If original document is tagged, then by default all resultant document will also be tagged. This could be changed with this flag - if set to false, resultant documents will be not tagged, even if original document is tagged.

Parameters
preserveTagged defines whether the resultant documents need to be tagged

◆ SplitByOutlines()

virtual IList<PdfDocument> iText.Kernel.Utils.PdfSplitter.SplitByOutlines ( IList< String >  outlineTitles )
inlinevirtual

Split a document by outline title (bookmark name), find outline by name and places the entire hierarchy in a separate document ( outlines and pages ) .

Parameters
outlineTitles list of outline titles .
Returns
Collection of iText.Kernel.Pdf.PdfDocument which contains split parts of a document

◆ SplitByPageCount() [1/2]

virtual IList<PdfDocument> iText.Kernel.Utils.PdfSplitter.SplitByPageCount ( int  pageCount )
inlinevirtual

Splits a document into smaller documents with no more than @pageCount pages each.

Parameters
pageCount the biggest possible number of pages in a split document.
Returns
the list of resultant documents. By warned that they are not closed.

◆ SplitByPageCount() [2/2]

virtual void iText.Kernel.Utils.PdfSplitter.SplitByPageCount ( int  pageCount,
PdfSplitter.IDocumentReadyListener  documentReady 
)
inlinevirtual

Splits a document into smaller documents with no more than @pageCount pages each.

Parameters
pageCount the biggest possible number of pages in a split document.
documentReady the event listener which is called when another document is ready. You can close this document in this listener, for instance.

◆ SplitByPageNumbers() [1/2]

virtual IList<PdfDocument> iText.Kernel.Utils.PdfSplitter.SplitByPageNumbers ( IList< int >  pageNumbers )
inlinevirtual

Splits the document by page numbers.

Parameters
pageNumbers the numbers of pages from which another document is to be started. If the first element is not 1, then 1 is implied (i.e. the first split document will start from page 1 in any case).
Returns
the list of resultant documents. By warned that they are not closed.

◆ SplitByPageNumbers() [2/2]

virtual void iText.Kernel.Utils.PdfSplitter.SplitByPageNumbers ( IList< int >  pageNumbers,
PdfSplitter.IDocumentReadyListener  documentReady 
)
inlinevirtual

Splits the document by page numbers.

Parameters
pageNumbers the numbers of pages from which another document is to be started. If the first element is not 1, then 1 is implied (i.e. the first split document will start from page 1 in any case).
documentReady the event listener which is called when another document is ready. You can close this document in this listener, for instance.

◆ SplitBySize()

virtual IList<PdfDocument> iText.Kernel.Utils.PdfSplitter.SplitBySize ( long  size )
inlinevirtual

Splits the document basing on the given size specified in bytes.

Parameters
size Preferred size specified in bytes for splitting.
Returns
The documents which the source document was split into. Be warned that these documents are not closed.