OpenOptions Class

Provides additional configuration options for opening a PdfDocument.

public class OpenOptions
Namespace
PdfToSvg
Package
PdfToSvg.NET (since v0.7.0)
Inheritance
System.Object PdfToSvg.OpenOptions

Example

If a PDF document is password protected, you need to specify the PDF password to be able to convert the document. The following example shows how to open a password protected document.

Convert password protected PDF
var openOptions = new OpenOptions
{
    Password = "password"
};

using (var document = PdfDocument.Open("password-protected.pdf", openOptions))
{
    var pageNo = 1;

    foreach (var page in document.Pages)
    {
        page.SaveAsSvg($"output_{pageNo++}.svg");
    }
}

Constructors

OpenOptionsInitializes a new instance of the OpenOptions class

Properties

PasswordThe password used for opening the PDF. This can be either the user password or the owner password. If the owner password is specified, any usage restrictions are bypassed.

See Also

PdfToSvg Namespace
Open(String, OpenOptions, CancellationToken)