Problem in Secured document

Hi,

I'm using following function to secure my document.

Public Function SecureDocument(ByVal InStream As Stream) As Stream

Dim OutStream As Stream = InStream

'Apply privileges

Dim fileSecurity As PdfFileSecurity = New PdfFileSecurity(InStream, OutStream)

fileSecurity.SetPrivilege(DocumentPrivilege.Print)

Return OutStream

End Function

Attaching also the generated secured doc file.

If you go through document properties, in Security Tab, you can see

Permissions Password: Yes

As you can see, I'm not setting any password for this document & if I want to change the settings, it asks for a password.

This is my 1st problem.

Now, 2nd problem is that I'm using

Dim PDFDoc As New Aspose.Pdf.Document(InStream)

Dim OptiStream As New MemoryStream

PDFDoc.OptimizeSize = True

PDFDoc.Optimize()

PDFDoc.Save(OptiStream)

Return OptiStream

this code to optimize the document.

If I try it after securing it, this code throws exception "Object not found"

If I secure the document after optimaization, it again increases it's size by almost 100-120%. I can't optimize it once it is secured.

I'm using latest Aspose.PDF.dll (7.1.0.0)

Hi Manoj,

Thank you for sharing the details.

Well, security settings require password protection (you can check it with Adobe as well). Now, there are two overloaded methods for document privilege settings as mentioned below.

PdfFileSecurity.SetPrivilege(Aspose.Pdf.Facades.DocumentPrivilege)

PdfFileSecurity.SetPrivilege ( System.String,System.String,Aspose.Pdf.Facades.DocumentPrivilege)

First method does not take any password and if you can see the details of the method, it is mentioned that it will add a random string as a password if the password is not provided. In case you need to provide a password, you can use the second method.

Regarding your second issue, I am able to reproduce your mentioned issue after an initial test. Your issue has been registered in our issue tracking system with issue id: PDFNEWNET-34087 . You will be notified via this forum thread regarding any updates against your issue.

Sorry for the inconvenience,

Hi,

What is the status of this: PDFNEWNET-34087

Hi Manoj,

I am afraid; your issue is not resolved at the moment. I have asked the development team to share an ETA regarding the resolution of your issue. As soon as I get feedback, I will notify you via this forum thread.

Also, I would like to inform you that Aspose provides Priority Support and Enterprise Support plans to provide high priority support and high priority resolution of issues. Please check the following link to check the details regarding different support options.

http://www.aspose.com/corporate/services/default.aspx

Thank You & Best Regards,

Hi Manoj,

Thank you for being patient.

I have received feedback from the development team, and your issue is planned to be fixed in our next release of Aspose.Pdf for .NET v7.3 (to be released in September 2012). Please be patient and spare us some time to get your issue fixed. We will notify you via this forum thread once the issue gets resolved and the new release is available for download.

Sorry for the inconvenience.

The issues you have found earlier (filed as PDFNEWNET-34087) have been fixed in Aspose.Pdf for .NET 7.3.0.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.