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

Free Support Forum - aspose.com

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.