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 |
Stack Trace:
|
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