pdftron.PDF
Class PageSet

java.lang.Object
  extended by pdftron.PDF.PageSet

public class PageSet
extends java.lang.Object

PageSet is a container of page numbers ordered following a linear sequence. The page numbers are integers and must be greater than zero. Duplicates are allowed.

Note:
this is not a mathematical set

Field Summary
static int e_all
          The Constant e_all.
static int e_even
          The Constant e_even.
static int e_odd
          The Constant e_odd.
 
Constructor Summary
PageSet()
          Default constructor.
PageSet(int one_page)
          Construct a set of pages with just one number.
PageSet(int range_start, int range_end)
          Construct a range of pages.
PageSet(int range_start, int range_end, int filter)
          Construct a filtered range of pages.
 
Method Summary
 void addPage(int one_page)
          Add a page number to the sequence.
 void addRange(int range_start, int range_end)
          Add a range of values to the sequence.
 void addRange(int range_start, int range_end, int filter)
          Add a range of values to the sequence.
 void destroy()
          Frees the native memory of the object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

e_all

public static final int e_all
The Constant e_all.

See Also:
Constant Field Values

e_odd

public static final int e_odd
The Constant e_odd.

See Also:
Constant Field Values

e_even

public static final int e_even
The Constant e_even.

See Also:
Constant Field Values
Constructor Detail

PageSet

public PageSet()
Default constructor. Constructs 'PageSet' with no pages


PageSet

public PageSet(int one_page)
Construct a set of pages with just one number.

Parameters:
one_page - a valid page number
See Also:
addPage

PageSet

public PageSet(int range_start,
               int range_end)
Construct a range of pages.

Parameters:
range_start - the start page number of the range
range_end - the end page number of the range
See Also:
addRange

PageSet

public PageSet(int range_start,
               int range_end,
               int filter)
Construct a filtered range of pages.

Parameters:
range_start - the start page number of the range
range_end - the end page number of the range
filter - page set filter
See Also:
addRange
Method Detail

destroy

public void destroy()
             throws PDFNetException
Frees the native memory of the object. This can be explicity called to control the deallocation of native memory and avoid situations where the garbage collector does not free the object in a timely manner.

Throws:
PDFNetException

addPage

public void addPage(int one_page)
Add a page number to the sequence.

Parameters:
one_page - The page number being added

addRange

public void addRange(int range_start,
                     int range_end)
Add a range of values to the sequence. Reverse ordering is legal.

Parameters:
range_start - The low value in the range
range_end - The high value in the range

addRange

public void addRange(int range_start,
                     int range_end,
                     int filter)
Add a range of values to the sequence. Reverse ordering is legal.

Parameters:
range_start - The low value in the range
range_end - The high value in the range
filter - -e_all: Default, includes all pages in the range -e_odd: Includes odd numbers in the range (discards even numbers) -e_even: Includes even numbers in the range (discards odd numbers)


© 2002-2011 PDFTron Systems Inc.