Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

PdfPageSelection

OfficeIMO.Pdf

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

Represents caller-ordered one-based PDF page selections.

Inheritance

  • object
  • PdfPageSelection

Usage

Explore 45 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 37

Methods

Equals 2 overloads
public bool Equals(PdfPageSelection? other) #

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

Parameters

other OfficeIMO.Pdf.PdfPageSelection? required
An object to compare with this object.

Returns

bool true if the current object is equal to the other parameter; otherwise, false.
public override bool Equals(object? obj) #

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

Parameters

obj object? required
The object to compare with the current object.

Returns

bool true if the specified object is equal to the current object; otherwise, false.
From 2 overloads
public static PdfPageSelection From(params int[] pageNumbers) #

Creates a selection from one or more one-based page numbers.

Parameters

pageNumbers int[] required
public static PdfPageSelection From(PdfPageRange pageRange) #

Creates a selection from one inclusive one-based page range.

Parameters

pageRange OfficeIMO.Pdf.PdfPageRange required
public static PdfPageSelection FromRanges(params PdfPageRange[] pageRanges) #

Creates a selection from one or more inclusive one-based page ranges.

Parameters

pageRanges OfficeIMO.Pdf.PdfPageRange[] required
public override int GetHashCode() #

Serves as the default hash function.

Returns

int A hash code for the current object.
public static PdfPageSelection Parse(string pageRanges) #

Parses comma- or semicolon-separated one-based page ranges such as 1, 1-3, or 3,1-2.

Parameters

pageRanges string required
public IReadOnlyList<int> Resolve(int pageCount) #

Resolves this selection against a document page count, preserving caller order and repeated pages.

Parameters

pageCount int required

Returns

IReadOnlyList<int>
public override string ToString() #

Returns a string that represents the current object.

Returns

string A string that represents the current object.
public static bool TryParse(string? pageRanges, out PdfPageSelection? selection) #

Attempts to parse comma- or semicolon-separated one-based page ranges.

Parameters

pageRanges string? required
selection OfficeIMO.Pdf.PdfPageSelection? required

Returns

bool

Properties

public IReadOnlyList<PdfPageRange> Ranges { get; } #

Inclusive one-based ranges in caller order.

public int PageCount { get; } #

Total selected page count before operation-specific de-duplication.