hi there
we have password protected .xls file and want to convert into pdf password protected file.
as we do :
we have function that return as byte[]
start function
workbook = New Aspose.Cells.Workbook
'workbook.Open(Request.PhysicalApplicationPath & strInputFilename)
workbook.Open(strInputFilename, Aspose.Cells.FileFormatType.Excel2003, "007")
'ExceltoPDF(workbook, strOutputFilename)
strFileName = Path.GetFileName(strInputFilename)
strFileName = strFileName.Substring(0, strFileName.LastIndexOf(".")) & ".xml"
workbook.Save(strServerPath & strFileName, Aspose.Cells.FileFormatType.AsposePdf)
pdf.BindXML(strServerPath & strFileName, Nothing)
pdf.Security = New Aspose.Pdf.Security
pdf.Security.UserPassword = "007"
'remove the temporary xml file
File.Delete(strServerPath & strFileName)
Return pdf.GetBuffer()
end function
on pdf.GetBuffer() we get exception : object reference not set to an instance of an object.
help me to find the solution on this issue.
regard
jazz