Save large PDF with origin file path throw exception

Description

Aspose.PDF throw exception cannot access file because it is being used by another process if file’s size is too large( >=300Mb ).

Env

  • Aspose.PDF for .NET 23.1

Code

void Test()
{
    var doc=new Aspose.Pdf.Document(@"C:\Users\XCL\Desktop\test\test.pdf");
    doc.Save(@"C:\Users\XCL\Desktop\test\test.pdf");
}

Exception

image.png (113.7 KB)

Test File

Cannot upload over 50Mb.

@xucongli1989
This is a specific of the Aspose.Pdf library with files larger than 200MB. You can use doc.Save() with no parameters, or save to a new one. Please, note that the doc.Save() method without parameters is used for incremental updates. This means that the changes will be appended to the end of the file, leaving its original contents untouched.

@xucongli1989
I think this is a strong omission and I will create a corresponding task.

1 Like

@xucongli1989
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-53642

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.

We also ran into the same issue in Aspose.PDF version 23.3.0.0 for larger pdf files.
Is this issue still open?

@Bishnu_Rana
Yes, this problem is not solved yet, unfortunately.

Any plans to consider this in future?

@Bishnu_Rana
I wrote to the development team that this is not a single request. The status of the task has been slightly raised, but I can’t set any specific deadlines.

Is there any progress on this issue?

@xucongli1989

We are afraid that the earlier logged ticket has not been yet resolved. It is an enhancement request and can take some amount of time to get fully implemented. We will inform you in this forum thread as soon as we make some progress towards ticket resolution. Please spare us some time.

Hello,
We have a similar issue, I’ll report another ticket and link this in there.

Regards,
Yulian

@yulian.dimitrov

Sure, please feel free to create a new topic with your sample files. We will address it accordingly.

As I mentioned in the previous comment here is the new ticket:
Saving large files throws exception on Windows and saves blank file on Linux - Free Support Forum - aspose.com

@yulian.dimitrov

Sure. We will further proceed in the newly created topic.