Hi,
I am using latest version of Aspose.Words and Aspose.Pdf 17.6 which I downloaded from
https://downloads.aspose.com/words/net
and
https://downloads.aspose.com/pdf/net
respectively.
I am trying to password protect the pdf being generated from html but I do not see this working.
My code is
using (MemoryStream stream = new MemoryStream(byteArray))
{
Aspose.Words.Document wordDoc = new Aspose.Words.Document(stream);
wordDoc.Protect(Aspose.Words.ProtectionType.ReadOnly, password);
wordDoc.Save(pathToSaveServer + "\\" + filename);
//Aspose.Pdf.Generator.Pdf pdf1 = new Aspose.Pdf.Generator.Pdf(stream);
//pdf1.Security = new Aspose.Pdf.Generator.Security();
//pdf1.Security.UserPassword = password;
//pdf1.Save(pathToSaveServer + "\" + filename);
}
Here with previous version of aspose.pdf I had reference of Aspose.Pdf.Generator but with above version of dlls I do not see any reference for Aspose.Pdf.Generator
I have followed the links
So basically what I am trying is to save html string as pdf with password protection.
So please guide me how this can be done
Thanks
Rohit