Share via


PdfDocument.LoadFromFileAsync Method

Definition

Overloads

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.

LoadFromFileAsync(IStorageFile)

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

public:
 static IAsyncOperation<PdfDocument ^> ^ LoadFromFileAsync(IStorageFile ^ file);
/// [Windows.Foundation.Metadata.Overload("LoadFromFileAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<PdfDocument> LoadFromFileAsync(IStorageFile const& file);
[Windows.Foundation.Metadata.Overload("LoadFromFileAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<PdfDocument> LoadFromFileAsync(IStorageFile file);
function loadFromFileAsync(file)
Public Shared Function LoadFromFileAsync (file As IStorageFile) As IAsyncOperation(Of PdfDocument)

Parameters

file
IStorageFile

The file, which represents a Portable Document Format (PDF) document.

Returns

The asynchronous operation.

Attributes

See also

Applies to

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.

public:
 static IAsyncOperation<PdfDocument ^> ^ LoadFromFileAsync(IStorageFile ^ file, Platform::String ^ password);
/// [Windows.Foundation.Metadata.Overload("LoadFromFileWithPasswordAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<PdfDocument> LoadFromFileAsync(IStorageFile const& file, winrt::hstring const& password);
[Windows.Foundation.Metadata.Overload("LoadFromFileWithPasswordAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<PdfDocument> LoadFromFileAsync(IStorageFile file, string password);
function loadFromFileAsync(file, password)
Public Shared Function LoadFromFileAsync (file As IStorageFile, password As String) As IAsyncOperation(Of PdfDocument)

Parameters

file
IStorageFile

The file, which represents a Portable Document Format (PDF) document.

password
String

Platform::String

winrt::hstring

The password to open the Portable Document Format (PDF) document, if it requires one.

Returns

The asynchronous operation.

Attributes

Remarks

If the Portable Document Format (PDF) document does not require a password, this method ignores it.

This method returns an ERROR_WRONG_PASSWORD error if the wrong password is specified.

See also

Applies to