We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

PDF save throws exception object not reference

I’m using Aspose PDF 10.7, when I run following code with our sample, it throws exception
bool isOk = true;

PdfContentEditor contentEditor = new PdfContentEditor();

// Remove all attachment

// Remove document action
catch (Exception e)
isOk = false;
Console.WriteLine("ERROR: Failed to remove document open action from PDF. " + e.Message);

// Save updated PDF
contentEditor.Save(filePath); <---- expcetion: object not reference throws here.

return isOk;

My sample is general PDF file (attached)

Hi Vinh,

Thanks for your inquiry. I have tested your scenario with shared document using Aspose.Pdf for .NET 10.8.0 and managed to observe the reported issue. For further investigation, I have logged an issue in our issue tracking system as PDFNEWNET-39395 and also linked your request to it. We will keep you updated via this thread regarding the issue status.

Please feel free to contact us for any further assistance.

<span style=“font-size:10.0pt;line-height:115%;font-family:“Arial”,“sans-serif”;
mso-fareast-language:EN-US;mso-bidi-language:AR-SA”>Best Regards

The issues you have found earlier (filed as PDFNET-39395) have been fixed in Aspose.PDF for .NET 22.3.