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

Free Support Forum - aspose.com

The process cannot access the file will occurs when I use Document.Save method

Hi,
Not able to save a pdf file if it its size is more than 400MB.(with Aspose.pdf version 20.3)

The process cannot access the file ‘C:\users\Desktop\Big PDF\402mb.pdf’ because it is being used by annother process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream…ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
at Aspose.Pdf.Document.PdfFileInfo.Save(String outputFileName)

some code as follows:

var pdfSign = new PdfFileSignature(_document);
var names = pdfSign.GetSignNames();
foreach (var name in names)
{
    pdfSign.RemoveSignature(name);
}
_document.Save(OutputFile);    // outputfile is the path of target file

Is Save() method have some problems?
Thanks in advance for help!

@LittteBird

There is no such known issue with Save() method. However, could you please share a sample console application which is able to reproduce the issue you are facing. We will test the scenario in our environment and address it accordingly.