PdfDocument Class

Definition

Represents a Portable Document Format (PDF) document.

public ref class PdfDocument sealed
class PdfDocument sealed
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Static(typeof(Windows.Data.Pdf.IPdfDocumentStatics), 65536, typeof(Windows.Foundation.UniversalApiContract))]
public sealed class PdfDocument
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Static(typeof(Windows.Data.Pdf.IPdfDocumentStatics), 65536, "Windows.Foundation.UniversalApiContract")]
public sealed class PdfDocument
Public NotInheritable Class PdfDocument
Inheritance
PdfDocument
Attributes

Windows 10 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)

Outputs an asynchronous operation. When the operation completes, a PdfDocument object is returned, which represents 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.

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.

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.

Applies to

See also