hi,
I have downloaded Aspose.Pdf Library and I'd like to know how I can use it to protect (making readonly) an existing pdf file.
I tried with Aspose.Pdf.Generator.Pdf() object and Security property with the code VB below:
Dim invoiceobject As Aspose.Pdf.Generator.Pdf
Dim secur As Aspose.Pdf.Generator.Security
Dim oFileStream As System.IO.FileStream
oFileStream = MyLibrary.GetInvoice()
invoiceobject = New Aspose.Pdf.Generator.Pdf(oFileStream)
secur = New Aspose.Pdf.Generator.Security()
secur.IsPrintingAllowed = True
secur.IsContentsModifyingAllowed = False
invoiceobject .Security = secur
invoiceobject .Save("d:\ReadOnlyInvoice.pdf")
invoiceobject .Close()
The code runs correctly (there is no exception) but invoiceobject doesn't create the "ReadOnlyInvoice.pdf". Can anybody help me please?
Thank you
Simone