Load the password-protected documents
Leave feedback
On this page
GroupDocs.Annotation allows you to annotate documents that are protected with a password.
To load a password protected file, follow these steps:
- Instantiate the Annotator class. Specify the document path or stream.
- Instantiate the LoadOptions class. Specify the source document password as a parameter.
The following code snippet shows how to load a password protected file:
using (Annotator annotator = new Annotator("input.pdf", new LoadOptions() { Password = "1234" }))
{
AreaAnnotation area = new AreaAnnotation()
{
Box = new Rectangle(100, 100, 100, 100),
BackgroundColor = 65535,
};
annotator.Add(area);
annotator.Save("result.pdf");
}
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.