# Class: PageSet

## PDFNet. PageSet

#### new PageSet()

  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)

### Methods

#### <static> create()

  Default constructor. Constructs 'PageSet' with no pages

  ##### Returns:

  A promise that resolves to an object of type: "PageSet"

  Type
    PDFNet.PageSet

#### <static> createFilteredRange(range_start, range_end, filter)

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `range_start` | number |
  `range_end` | number |
  `filter` | number/enum |
      PDFNet.PageSet.Filter = {
      	e_all : 0
      	e_even : 1
      	e_odd : 2
      }

  ##### Returns:

  A promise that resolves to an object of type: "PageSet"

  Type
    PDFNet.PageSet

#### <static> createRange(range_start, range_end)

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `range_start` | number |
  `range_end` | number |

  ##### Returns:

  A promise that resolves to an object of type: "PageSet"

  Type
    PDFNet.PageSet

#### <static> createSinglePage(one_page)

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `one_page` | number |

  ##### Returns:

  A promise that resolves to an object of type: "PageSet"

  Type
    PDFNet.PageSet

#### addPage(one_page)

  Add a value to the sequence.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `one_page` | number | The page number being added

#### addRange(range_start, range_end, filter)

  Add a range of values to the sequence. Reverse ordering is legal.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `range_start` | number | The starting value in the range
  `range_end` | number | The ending value in the range
  `filter` | number/enum |
      PDFNet.PageSet.Filter = {
      	e_all : 0
      	e_even : 1
      	e_odd : 2
      }
      	-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)

#### destroy()

  Frees the native memory of the object.

#### Search results