OpenOptions Class
Provides additional configuration options for opening a PdfDocument.
public class 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
OpenOptions | Initializes a new instance of the OpenOptions class |
Properties
Password | The 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. |