Share via


PdfDocument Class

Definition

Represents a Portable Document Format (PDF) document.

public ref class PdfDocument sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class PdfDocument final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class PdfDocument
Public NotInheritable Class PdfDocument
Inheritance
Object Platform::Object IInspectable PdfDocument
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Remarks

Methods of this class return an STG_E_READFAULT error if there is a problem in reading the Portable Document Format (PDF) document.

Properties

IsPasswordProtected

Gets whether the Portable Document Format (PDF) document is password-protected.

PageCount

Gets the number of pages in the Portable Document Format (PDF) document.

Methods

GetPage(UInt32)

Gets a page from a Portable Document Format (PDF) document.

LoadFromFileAsync(IStorageFile, String)

Outputs an asynchronous operation. When the operation completes, a PdfDocument object is returned, which represents a Portable Document Format (PDF) document. Use this method if the Portable Document Format (PDF) document is password-protected.

LoadFromFileAsync(IStorageFile)

Outputs an asynchronous operation. When the operation completes, a PdfDocument object is returned, which represents a Portable Document Format (PDF) document.

LoadFromStreamAsync(IRandomAccessStream, String)

Creates a PdfDocument object, representing a Portable Document Format (PDF) document, from a stream of data that represents a Portable Document Format (PDF) document in the file system. Use this method if the Portable Document Format (PDF) document is password-protected.

LoadFromStreamAsync(IRandomAccessStream)

Creates a PdfDocument object, representing a Portable Document Format (PDF) document, from a stream of data that represents a Portable Document Format (PDF) document in the file system.

Applies to

See also