Metadata

Metadata(string)

Initializes a new instance of the Metadata class.

public Metadata(string filePath)
Parameter Type Description
filePath String A string that contains the full name of the file from which to create a Metadata instance.

Remarks

Learn more

Examples

This example demonstrates how to load a file from a local disk.

using (Metadata metadata = new Metadata(Constants.InputOne))
{
    // Extract, edit or remove metadata here
}

See Also


Metadata(Stream)

Initializes a new instance of the Metadata class.

public Metadata(Stream document)
Parameter Type Description
document Stream A stream that contains the document to load.

Remarks

Learn more

Examples

This example demonstrates how to load a file from a stream.

using (Stream stream = File.Open(Constants.InputDoc, FileMode.Open, FileAccess.ReadWrite))
using (Metadata metadata = new Metadata(stream))
{
   // Extract, edit or remove metadata here
}

See Also


Metadata(string, LoadOptions)

Initializes a new instance of the Metadata class.

public Metadata(string filePath, LoadOptions loadOptions)
Parameter Type Description
filePath String A string that contains the full name of the file from which to create a Metadata instance.
loadOptions LoadOptions Additional options to use when loading a document.

Remarks

Learn more

Examples

This example demonstrates how to load a password-protected document.

// Specify the password
var loadOptions = new LoadOptions
{
    Password = "123"
};

using (var metadata = new Metadata(Constants.ProtectedDocx, loadOptions))
{
    // Extract, edit or remove metadata here
}

See Also


Metadata(Stream, LoadOptions)

Initializes a new instance of the Metadata class.

public Metadata(Stream document, LoadOptions loadOptions)
Parameter Type Description
document Stream A stream that contains the document to load.
loadOptions LoadOptions Additional options to use when loading a document.

Remarks

Learn more

See Also