IPdfDocument Interface
Definition
Represents a loaded PDF document.
public interface IPdfDocument
Methods
| Name | Description |
|---|---|
| GetOutline | Gets the document outline (bookmarks). |
| GetPage | Gets a page by index (0-based). |
| GetPageSize | Gets page dimensions without loading the full page. |
| GetUserBookmarks | Reads user-created bookmarks (saved page positions) from the document's XMP metadata. These are the Preview-style bookmarks stored under the apple-preview namespace, distinct from the author outline returned by Avalonia.Controls.Pdf.Core.IPdfDocument.GetOutline. Returns an empty list when the document has none. |
GetOutline Method
Gets the document outline (bookmarks).
public System.Collections.Generic.IReadOnlyList<Avalonia.Controls.Pdf.Core.PdfBookmark> GetOutline()
Returns
System.Collections.Generic.IReadOnlyList<Avalonia.Controls.Pdf.Core.PdfBookmark>
GetPage Method
Gets a page by index (0-based).
public Avalonia.Controls.Pdf.Core.IPdfPage GetPage(int index)
Parameters
index int
Returns
GetPageSize Method
Gets page dimensions without loading the full page.
public ValueTuple<double, double> GetPageSize(int index)
Parameters
index int
Returns
ValueTuple<double, double>
GetUserBookmarks Method
Reads user-created bookmarks (saved page positions) from the document's XMP metadata.
These are the Preview-style bookmarks stored under the apple-preview namespace,
distinct from the author outline returned by Avalonia.Controls.Pdf.Core.IPdfDocument.GetOutline. Returns an empty
list when the document has none.
public System.Collections.Generic.IReadOnlyList<Avalonia.Controls.Pdf.Core.PdfUserBookmark> GetUserBookmarks()
Returns
System.Collections.Generic.IReadOnlyList<Avalonia.Controls.Pdf.Core.PdfUserBookmark>
Properties
| Name | Description |
|---|---|
| IsPasswordProtected | Gets whether the document is password-protected. |
| Metadata | Gets document metadata. |
| PageCount | Gets the total number of pages. |
| Permissions | Gets the raw PDF permission bits (as returned by the PDF security handler). 0xFFFFFFFF means no restrictions. |
| Version | Gets the PDF version (e.g., "1.7" for PDF 1.7). |
IsPasswordProtected Property
Gets whether the document is password-protected.
public bool IsPasswordProtected { get; set; }
Metadata Property
Gets document metadata.
public Avalonia.Controls.Pdf.Core.PdfMetadata Metadata { get; set; }
PageCount Property
Gets the total number of pages.
public int PageCount { get; set; }
Permissions Property
Gets the raw PDF permission bits (as returned by the PDF security handler).
0xFFFFFFFF means no restrictions.
public uint Permissions { get; set; }
Version Property
Gets the PDF version (e.g., "1.7" for PDF 1.7).
public string Version { get; set; }