Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/

API Reference

Class

PdfPageSelector

Namespace OfficeIMO.Pdf
Assembly OfficeIMO.Pdf
Source revision a039964de4cc with working tree changes
Implements
IEquatable<PdfPageSelector>
Modifiers sealed

Represents a document-relative, caller-ordered page selection expression.

Inheritance

  • Object
  • PdfPageSelector

Remarks

Selectors are resolved against a document page count. Supported terms include absolute pages and ranges (1, 1-3, 5..2), end-relative pages (last, last-2), all, odd, even, and exclusions prefixed with !.

Usage

Explore 28 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Accepted by parameters 19

Methods

Equals 2 overloads
public Boolean Equals(PdfPageSelector? other) #
Returns: Boolean

Indicates whether the current object is equal to another object of the same type.

Parameters

other OfficeIMO.Pdf.PdfPageSelector? requiredposition: 0
An object to compare with this object.

Returns

true if the current object is equal to the other parameter; otherwise, false.

public override Boolean Equals(Object? obj) #
Returns: Boolean

Determines whether the specified object is equal to the current object.

Parameters

obj System.Object? requiredposition: 0
The object to compare with the current object.

Returns

true if the specified object is equal to the current object; otherwise, false.

public override Int32 GetHashCode() #
Returns: Int32

Serves as the default hash function.

Returns

A hash code for the current object.

public static PdfPageSelector Parse(String expression) #
Returns: PdfPageSelector

Parses a document-relative page selector.

Parameters

expression System.String requiredposition: 0
Resolve 2 overloads
public IReadOnlyList<Int32> Resolve(Int32 pageCount) #
Returns: IReadOnlyList<Int32>

Resolves the selector to caller-ordered, one-based page numbers.

Parameters

pageCount System.Int32 requiredposition: 0
public IReadOnlyList<Int32> Resolve(Int32 pageCount, Int32 maximumPages) #
Returns: IReadOnlyList<Int32>

Resolves the ordered selection, rejecting it before retaining more than the supplied page budget.

Parameters

pageCount System.Int32 requiredposition: 0
maximumPages System.Int32 requiredposition: 1
public PdfPageSelection ResolveSelection(Int32 pageCount) #
Returns: PdfPageSelection

Resolves the selector to an absolute page selection.

Parameters

pageCount System.Int32 requiredposition: 0
public override String ToString() #
Returns: String

Returns a string that represents the current object.

Returns

A string that represents the current object.

public static Boolean TryParse(String? expression, out PdfPageSelector? selector) #
Returns: Boolean

Attempts to parse a document-relative page selector.

Parameters

expression System.String? requiredposition: 0
selector OfficeIMO.Pdf.PdfPageSelector? requiredposition: 1

Properties

public String Expression { get; } #

Original normalized selector expression.