PDF Security Error from Aspose.word document

Hi, this is my problem with PDF.

When I try to set the security properties to a PDF I got this error:

Input string was not in a correct format.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.FormatException: Input string was not in a correct format.

Source Error:

An unhandled exception was generated during the execution of the
current web request.
Information regarding the origin and location of the exception can
be identified using the exception stack trace below.

Stack Trace:

[FormatException: Input string was not in a correct format.]
System.StringParser.Error() +48
System.StringParser.ParseTime() +52
System.StringParser.Parse(String s, Boolean allowWhiteSpace) +175
System.TimeSpan.Parse(String s) +36
Aspose.Pdf.Hypertext.g.a(Byte[] A_0, Byte[] A_1, Int32 A_2, Boolean A_3) +293
Aspose.Pdf.Pdf.t() +402
Aspose.Pdf.Pdf.Save(Stream stream) +59
Rimborsi.ca_PDFStampa.GenerateDocument() in
c:\inetpub\wwwroot\CassaAssistenza\Rimborsi\ca_PDFStampa.aspx.vb:86

and this is the code:

Dim stream1 As New System.IO.MemoryStream

doc.Save(stream1, SaveFormat.FormatAsposePdf)

stream1.Seek(0, SeekOrigin.Begin)

Dim xmldoc1 As New XmlDocument

xmldoc1.Load(stream1)

Dim pdf As New Aspose.Pdf.Pdf

pdf.IsImagesInXmlDeleteNeeded = True

pdf.BindXML(xmldoc1, Nothing)

’ Security Settings on PDF

pdf.Security = New Aspose.Pdf.Security

pdf.Security.IsAnnotationsModifyingAllowed = False

pdf.Security.IsContentsModifyingAllowed = False

pdf.Security.IsCopyingAllowed = False

pdf.Security.IsDocumentAssemblyingAllowed = False

pdf.Security.IsScreenReadersAllowed = False

pdf.Author = “X”

pdf.Creator = “x”

pdf.Title = “x”

Response.ContentType = “application/pdf”

pdf.Save(Response.OutputStream)

Response.End()
----------------------------------


Thanks in Advance

Danilo Bassan

Dear Danilo,

Thank you for considering Aspose.

Can you please send the Word document to me?

As requested I’ve sent the files to your email address.

TIA
Danilo Bassan

Hi Danilo,

Thank you for considering Aspose.

I have fixed this bug. Please download hotfix here.

Now it’s ok.
Thank you


Danilo Bassan