Opening a protected PDF file generates file lock after closing

Hi, I have a problem with aspose.Pdf and reading the number of pages of a large document.
By reading a password protected file (without specifying the password), the file is locked during deletion.
This does not happen with small files.

I attach a solution (net fw 4.8 vs2022):
The “CreateBigPdf” project creates a file of approximately 250MB.

this file can be used in the “GetPageNum” project (replace the path of the variable “String pdfPath =”)

Another test that can be done is to create a pdf with a single page (CreateBigPdf.Main for (int i = 0; i < 2; i++))

The file will be deleted correctly.
AsposePdfExample.zip (1.4 MB)

@acquisti_comdatagroup_com

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): PDFNET-58889

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.