Class DocumentSource

Represents the source of a document, which may be a or an

Inheritance
System.Object
DocumentSource
Namespace: PSPDFKit.Document
Assembly: PSPDFKit.dll
Syntax
public sealed class DocumentSource : object

Properties

Password

The PDF password if required.

Declaration
public string Password { get; set; }
Property Value
Type Description
System.String

Methods

CreateFromBuffer(IBuffer)

Create a DocumentSource from an

Declaration
public static DocumentSource CreateFromBuffer(IBuffer buffer)
Parameters
Type Name Description
IBuffer buffer

The buffer this DocumentSource represents.

Returns
Type Description
DocumentSource

A DocumentSource representing the buffer.

CreateFromDataProvider(IDataProvider)

Create a DocumentSource from a PSPDFKit.Document.DocumentSource.DataProvider.

Declaration
public static DocumentSource CreateFromDataProvider(IDataProvider dataProvider)
Parameters
Type Name Description
IDataProvider dataProvider

The IDataProvider that is the data source of the PDF.

Returns
Type Description
DocumentSource

CreateFromStorageFile(StorageFile)

Create a DocumentSource from a

Declaration
public static DocumentSource CreateFromStorageFile(StorageFile file)
Parameters
Type Name Description
StorageFile file

The storage file this DocumentSource represents.

Returns
Type Description
DocumentSource

A DocumentSource representing the storage file.

CreateFromUidAsync(String)

Create a DocumentSource from a PSPDFKit UID Can throw a or if the UID is not in the correct format.

Declaration
public static IAsyncOperation<DocumentSource> CreateFromUidAsync(string uid)
Parameters
Type Name Description
System.String uid

The UID this DocumentSource represents.

Returns
Type Description
IAsyncOperation<DocumentSource>

A DocumentSource representing the file.

GetBuffer()

Gets the representing the DocumentSource if it was created with one.

Declaration
public IBuffer GetBuffer()
Returns
Type Description
IBuffer

The originating or null.

GetDataProvider()

Gets the IDataProvider representing the DocumentSource if it was created with one.

Declaration
public IDataProvider GetDataProvider()
Returns
Type Description
IDataProvider

The originating IDataProvider or null.

GetFile()

Gets the representing the DocumentSource if it was created with one.

Declaration
public StorageFile GetFile()
Returns
Type Description
StorageFile

The originating or null.

See Also