Hi,
Thanks for your patience.
We have further investigated the issue PDFNEWNET-36320 reported earlier and as per our observations, it does not seem to be a bug in Aspose.Pdf for .NET API. PDF only encrypts streams and strings objects, so the document is still leaking useful information in clear-text, such as pages count information in this case. What pdf reference says about encryption:
“Encryption applies to all strings and streams in the document’s PDF file, but not to other object types such as integers and boolean values, which are used primarily to convey information about the document’s structure rather than its content. Leaving these values unencrypted allows random access to the objects within a document, whereas encrypting the strings and streams protects the document’s substantive contents…”