org.pdfclown.tools.PageManager Class Reference

Tool for page management. More...

List of all members.

Public Member Functions

void Add (int index, ICollection< Page > pages)
 Inserts a collection of pages at the specified position in the document.
void Add (ICollection< Page > pages)
 Appends a collection of pages to the end of the document.
void Add (int index, Document document)
 Inserts a document at the specified position in the document.
void Add (Document document)
 Appends a document to the end of the document.
Document Extract (int startIndex, int endIndex)
 Extracts a page range from the document.
void Move (int startIndex, int endIndex, int targetIndex)
 Moves a page range to a target position within the document.
 PageManager (Document document)
 PageManager ()
void Remove (int startIndex, int endIndex)
 Removes a page range from the document.
IList< DocumentSplit (long maxDataSize)
 Splits the document into multiple subdocuments on maximum file size.
IList< DocumentSplit (params int[] indexes)
 Splits the document into multiple subdocuments delimited by the specified page indexes.
IList< DocumentSplit ()
 Bursts the document into single-page documents.

Static Public Member Functions

static long GetSize (Page page, HashSet< PdfReference > visitedReferences)
 Gets the data size of the specified page expressed in bytes.
static long GetSize (Page page)
 Gets the data size of the specified page expressed in bytes.

Properties

Document Document [get, set]
 Gets/Sets the document being managed.

Tool for page management.


Constructor & Destructor Documentation

org.pdfclown.tools.PageManager.PageManager (  ) 
org.pdfclown.tools.PageManager.PageManager ( Document  document  ) 

Member Function Documentation

void org.pdfclown.tools.PageManager.Add ( int  index,
ICollection< Page pages 
)

Inserts a collection of pages at the specified position in the document.

Parameters:
index Position at which the pages have to be inserted.
pages Pages to be inserted.
void org.pdfclown.tools.PageManager.Add ( ICollection< Page pages  ) 

Appends a collection of pages to the end of the document.

Parameters:
pages Pages to be added.
void org.pdfclown.tools.PageManager.Add ( int  index,
Document  document 
)

Inserts a document at the specified position in the document.

Parameters:
index Position at which the document has to be inserted.
document Document to be inserted.

References org.pdfclown.tools.PageManager.Add(), and org.pdfclown.documents.Document.Pages.

Referenced by org.pdfclown.tools.PageManager.Add().

void org.pdfclown.tools.PageManager.Add ( Document  document  ) 

Appends a document to the end of the document.

Parameters:
document Document to be added.

References org.pdfclown.tools.PageManager.Add(), and org.pdfclown.documents.Document.Pages.

Referenced by org.pdfclown.tools.PageManager.Add().

Document org.pdfclown.tools.PageManager.Extract ( int  startIndex,
int  endIndex 
)

Extracts a page range from the document.

Parameters:
startIndex The beginning index, inclusive.
endIndex The ending index, exclusive.
Returns:
Extracted page range.

References org.pdfclown.documents.Document.Include(), and org.pdfclown.documents.Document.Pages.

static long org.pdfclown.tools.PageManager.GetSize ( Page  page,
HashSet< PdfReference visitedReferences 
) [static]

Gets the data size of the specified page expressed in bytes.

Parameters:
page Page whose data size has to be calculated.
visitedReferences References to data objects excluded from calculation. This set is useful, for example, to avoid recalculating the data size of shared resources. During the operation, this set is populated with references to visited data objects.

References org.pdfclown.objects.PdfObjectWrapper.BaseObject, and org.pdfclown.tools.PageManager.GetSize().

Referenced by org.pdfclown.tools.PageManager.GetSize().

static long org.pdfclown.tools.PageManager.GetSize ( Page  page  )  [static]

Gets the data size of the specified page expressed in bytes.

Parameters:
page Page whose data size has to be calculated.

References org.pdfclown.tools.PageManager.GetSize().

Referenced by org.pdfclown.tools.PageManager.GetSize().

void org.pdfclown.tools.PageManager.Move ( int  startIndex,
int  endIndex,
int  targetIndex 
)

Moves a page range to a target position within the document.

Parameters:
startIndex The beginning index, inclusive.
endIndex The ending index, exclusive.
targetIndex The target index.
void org.pdfclown.tools.PageManager.Remove ( int  startIndex,
int  endIndex 
)

Removes a page range from the document.

Parameters:
startIndex The beginning index, inclusive.
endIndex The ending index, exclusive.

References org.pdfclown.documents.Document.Exclude().

IList<Document> org.pdfclown.tools.PageManager.Split ( long  maxDataSize  ) 

Splits the document into multiple subdocuments on maximum file size.

Parameters:
maxDataSize Maximum data size (expressed in bytes) of target files. Note that resulting files may be a little bit larger than this value, as file data include (along with actual page data) some extra structures such as cross reference tables.
Returns:
Split documents.

References org.pdfclown.documents.Page.Index.

IList<Document> org.pdfclown.tools.PageManager.Split ( params int[]  indexes  ) 

Splits the document into multiple subdocuments delimited by the specified page indexes.

Parameters:
indexes Split page indexes.
Returns:
Split subdocuments.
IList<Document> org.pdfclown.tools.PageManager.Split (  ) 

Bursts the document into single-page documents.

Returns:
Split subdocuments.

References org.pdfclown.documents.Pages.Add(), org.pdfclown.objects.PdfObjectWrapper.Clone(), and org.pdfclown.documents.Document.Pages.


Property Documentation

Document org.pdfclown.tools.PageManager.Document [get, set]

Gets/Sets the document being managed.

Copyright 2006-2013 Stefano Chizzolini. For more information, please visit PDF Clown home page.

Generated on Sat Feb 9 21:08:40 2013 for PDF Clown 0.1.2 by  doxygen 1.6.3