Skip to main content

PdfUserBookmark Class

Definition​

Assembly:Avalonia.Controls.PdfViewer
Package:Avalonia.Controls.PdfViewer

A user-created bookmark that flags a page as a saved reading position.

public class PdfUserBookmark

Inheritance: object -> PdfUserBookmark

Implements: IEquatable<PdfUserBookmark>

Remarks​

These are distinct from the document outline (Avalonia.Controls.Pdf.Core.PdfBookmark): the outline is the author-defined table of contents embedded in the PDF, whereas user bookmarks are positions the reader saves themselves. They are persisted in the document's XMP metadata under Apple's private apple-preview namespace (http://ns.apple.com/Preview/1.0/), so bookmarks created here interoperate with macOS Preview and vice versa. The schema is a page index plus a stable UUID; there is at most one bookmark per page.

Constructors​

NameDescription
PdfUserBookmarkCreates a user bookmark for the given page.

PdfUserBookmark Constructor​

Creates a user bookmark for the given page.

public PdfUserBookmark(int pageIndex, string uuid)

Parameters​

pageIndex int

Zero-based page index.

uuid string

Stable identifier; a new one is generated when omitted.

Methods​

NameDescription
Equals (2 overloads)Two bookmarks are equal when they flag the same page.
GetHashCodeNo summary available.
ToStringNo summary available.

Equals overloads​

Equals Method​

Two bookmarks are equal when they flag the same page.

public bool Equals(Avalonia.Controls.Pdf.Core.PdfUserBookmark other)
Parameters​

other Avalonia.Controls.Pdf.Core.PdfUserBookmark

Returns​

bool

Equals Method​

public bool Equals(object obj)
Parameters​

obj object

Returns​

bool

GetHashCode Method​

public int GetHashCode()

Returns​

int

ToString Method​

public string ToString()

Returns​

string

Properties​

NameDescription
PageIndexZero-based index of the bookmarked page.
PageNumberOne-based page number of the bookmarked page.
UuidStable identifier that round-trips with Preview (its apple-preview:UUID).

PageIndex Property​

Zero-based index of the bookmarked page.

public int PageIndex { get; set; }

PageNumber Property​

One-based page number of the bookmarked page.

public int PageNumber { get; set; }

Uuid Property​

Stable identifier that round-trips with Preview (its apple-preview:UUID).

public string Uuid { get; set; }