Redactor

Redactor(string)

Initializes a new instance of Redactor class using file path.

public Redactor(string filePath)
Parameter Type Description
filePath String Path to the file

Examples

The following example demonstrates how to open a document for redaction.

using (Redactor redactor = new Redactor(@"C:\sample.pdf"))
{
    // Here we can use document instance to perform redactions
}

See Also


Redactor(Stream)

Initializes a new instance of Redactor class using stream.

public Redactor(Stream document)
Parameter Type Description
document Stream Source stream of the document

Examples

The following example demonstrates how to open a document from stream.

using (Stream stream = File.Open(@"C:\\sample.pdf", FileMode.Open, FileAccess.ReadWrite))
{
    using (Redactor redactor = new Redactor(stream))
    {
        // Here we can use document instance to perform redactions
    }
}

See Also


Redactor(string, LoadOptions)

Initializes a new instance of Redactor class for a password-protected document using its path.

public Redactor(string filePath, LoadOptions loadOptions)
Parameter Type Description
filePath String Path to file.
loadOptions LoadOptions Options, including password.

See Also


Redactor(string, LoadOptions, RedactorSettings)

Initializes a new instance of Redactor class for a password-protected document using its path and settings.

public Redactor(string filePath, LoadOptions loadOptions, RedactorSettings settings)
Parameter Type Description
filePath String Path to file.
loadOptions LoadOptions File-dependent options, including password.
settings RedactorSettings Default settings for redaction process.

See Also


Redactor(Stream, LoadOptions)

Initializes a new instance of Redactor class for a password-protected document using stream.

public Redactor(Stream document, LoadOptions loadOptions)
Parameter Type Description
document Stream Source input stream.
loadOptions LoadOptions Options, including password.

Examples

The following example demonstrates how to open a password-protected documents using LoadOptions.

LoadOptions loadOptions = new LoadOptions("mypassword");
using (Redactor redactor = new Redactor(@"C:\sample.pdf", loadOptions))
{
    // Here we can use document instance to perform redactions
}

See Also


Redactor(Stream, LoadOptions, RedactorSettings)

Initializes a new instance of Redactor class for a password-protected document using stream and settings.

public Redactor(Stream document, LoadOptions loadOptions, RedactorSettings settings)
Parameter Type Description
document Stream Source input stream.
loadOptions LoadOptions Options, including password.
settings RedactorSettings Default settings for redaction process.

Examples

The following example demonstrates how to open a password-protected documents using LoadOptions.

LoadOptions loadOptions = new LoadOptions("mypassword");
using (Redactor redactor = new Redactor(@"C:\sample.pdf", loadOptions))
{
    // Here we can use document instance to perform redactions
}

See Also