Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

PdfDocument Class

Definition

Namespace:
Windows.Data.Pdf

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

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

Requirements Description
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

Name Description
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

Name Description
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


Feedback

Was this page helpful?