When I use the Javascript Collection and try throws NullObjectReference when trying to find whether the PDF contains javascript:
Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document(inStream);
JavaScriptCollection javascript = pdfDocument.JavaScript;
if (javascript == null)
hasJavascript = false;
It throws the Object null reference error:
{System.Collections.Generic.Dictionary2+ValueCollection[System.String,#=zT8W1SvLcfyjKy4R9Lm61eRRqwpltG2zbDQ==]} " at Aspose.Pdf.JavaScriptCollection.#=zLQAefWHRKy68(#=zBAxJlleIr5pNqZ7Vr4Tron3UFrvWWDoIFQ== #=zJDcxkC8=, List
1 #=z6K6xFRA=)\r\n
at Aspose.Pdf.JavaScriptCollection.get_Keys()"