Hi,
I’m trying to set the userpassword to a pdf document by using aspose pdf.
My source document is an aspose.slides presentation.
By following this example:
I made my code as follow:
Presentation pres = new Presentation(Path);
using (MemoryStream memory= new MemoryStream())
{
pres.Save(memory, Aspose.Slides.Export.SaveFormat.Pdf);
Aspose.Pdf.Generator.Pdf doc = new Aspose.Pdf.Generator.Pdf(memory);
doc.Security = new Security();
doc.Security.UserPassword = “test”;
doc.Save(OutputPath);
}
but it doesn’t save anything.
Am I doing something wrong?
thanks,
Devid.