Hello,
We are receiving an error when attempting to save a DOCX.
OS version: Windows 10 Pro (Version: 21H2, OS build: 19044.1706)
Target framework: .NET Framework 4.7.1
Aspose.Words version: 19.8.0.0
content file: sample (51.5 KB)
error message: “System.NullReferenceException: ‘Object reference not set to an instance of an object.’”
stack trace: “… doc.Save(inFile, pdfOptions)”
code: …
Dim doc As Aspose.Words.Document = New Aspose.Words.Document(oFile.FilePath & fileContent.FileName)
Dim inFile As String = oFile.FilePath & fileContent.FileName + ".pdf"
Dim pdfOptions As New Aspose.Words.Saving.PdfSaveOptions()
pdfOptions.PageCount = 5
doc.Save(inFile, pdfOptions)
Do you have any suggestions on how we can resolve this issue? Additionally, can you let us know what in the content file is causing this error?
Thank you!