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)

Extends

Members


<static> Filter

Type:
  • number
Properties:
Name Type Description
e_all number
e_even number
e_odd number

Methods


<static> create()

Default constructor. Constructs 'PageSet' with no pages
Returns:
A promise that resolves to an object of type: "PDFNet.PageSet"
Type
Promise.<PDFNet.PageSet>

<static> createFilteredRange(range_start, range_end [, filter])

Construct a range of pages
Parameters:
Name Type Argument Description
range_start number
range_end number
filter number <optional>
PDFNet.PageSet.Filter = {
	e_all : 0
	e_even : 1
	e_odd : 2
}
See:
  • AddRange
Returns:
A promise that resolves to an object of type: "PDFNet.PageSet"
Type
Promise.<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: "PDFNet.PageSet"
Type
Promise.<PDFNet.PageSet>

<static> createSinglePage(one_page)

Construct a set of pages with just one number
Parameters:
Name Type Description
one_page number
See:
  • AddPage
Returns:
A promise that resolves to an object of type: "PDFNet.PageSet"
Type
Promise.<PDFNet.PageSet>

addPage(one_page)

Add a value to the sequence.
Parameters:
Name Type Description
one_page number The page number being added
Returns:
Type
Promise.<void>

addRange(range_start, range_end [, filter])

Add a range of values to the sequence. Reverse ordering is legal.
Parameters:
Name Type Argument Description
range_start number The starting value in the range
range_end number The ending value in the range
filter number <optional>
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)
Returns:
Type
Promise.<void>

destroy()

Destructor
Inherited From:
Returns:
Type
Promise.<void>

takeOwnership()

Take the ownership of this object, so that PDFNet.runWithCleanup won't destroy this object.
Inherited From:
Returns:
Type
void