public class

PageSet

extends Object
implements AutoCloseable
java.lang.Object
   ↳ com.pdftron.pdf.PageSet

Class Overview

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.

Summary

Constants
int e_all Page set filter that includes all pages in the range.
int e_even Page set filter that includes even numbers in the range (discards odd numbers).
int e_odd Page set filter that includes odd numbers in the range (discards even numbers).
Public Constructors
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.
Public Methods
long __GetHandle()
void addPage(int one_page)
Adds a page number to the sequence.
void addRange(int range_start, int range_end)
Adds a range of values to the sequence.
void addRange(int range_start, int range_end, int filter)
Adds a range of values to the sequence.
void close()
Frees the native memory of the object.
void destroy()
Frees the native memory of the object.
[Expand]
Inherited Methods
From class java.lang.Object
From interface java.lang.AutoCloseable

Constants

public static final int e_all

Page set filter that includes all pages in the range.

Constant Value: 0 (0x00000000)

public static final int e_even

Page set filter that includes even numbers in the range (discards odd numbers).

Constant Value: 2 (0x00000002)

public static final int e_odd

Page set filter that includes odd numbers in the range (discards even numbers).

Constant Value: 1 (0x00000001)

Public Constructors

public PageSet ()

Default constructor. Constructs 'PageSet' with no pages.

public PageSet (int one_page)

Construct a set of pages with just one number.

See also addPage(int).

Parameters
one_page a valid page number

public PageSet (int range_start, int range_end)

Construct a range of pages.

See also addRange(int, int).

Parameters
range_start the start page number of the range
range_end the end page number of the range

public PageSet (int range_start, int range_end, int filter)

Construct a filtered range of pages.

See also addRange(int, int, int).

Parameters
range_start the start page number of the range
range_end the end page number of the range
filter page set filter.

Public Methods

public long __GetHandle ()

public void addPage (int one_page)

Adds a page number to the sequence.

Parameters
one_page the page number being added

public void addRange (int range_start, int range_end)

Adds 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

public void addRange (int range_start, int range_end, int filter)

Adds 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 page set filter.

public void close ()

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.

public void destroy ()

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.