After Save() - "The process cannot access...because it is being used by another process"

Hi,

When I’m usnig the next code (with Aspose.pdf version 9.5.0.0):

pdf.Save(123.pdf);
File.ReadAllBytes(123.pdf);

I’m getting exception: "The process cannot access the file ‘123.pdf’ because it is being used by another process."

Is Save() methid is asincorenit (run at background…)?
Is there something I can do for “close” the file?

Please yourt help,
Thanks,
Roi

Hi Roi,


Thanks for your inquiry. I am afraid we are unable to notice the issue while testing the scenario with Aspose.Pdf for .NET 9.5.0 using following sample code. We will appreciate it if you please share a sample console application to replicate the issue, so we will test the scenario at our end and will provide you information accordingly.

Pdf pdf = new Pdf();<o:p></o:p>

Aspose.Pdf.Generator.TextInfo Arial5 = new Aspose.Pdf.Generator.TextInfo();

Arial5.FontName = "Arial";

Arial5.FontSize = (float)5;

Aspose.Pdf.Generator.Section sec = pdf.Sections.Add();

sec.Paragraphs.Add(new Text("Hello World...",Arial5));

pdf.Save(myDir+"Roi.pdf");

File.ReadAllBytes(myDir + "Roi.pdf");


We are sorry for the inconvenience caused.

Best Regards,

Hi Tilal,

Now it works!
Thanks a lot,
Roi

Hi Roi,


Thanks for your feedback. It is good to know that you have managed to resolve the issue.

Please keep using our API and feel free to raise any question or concern. We will be more than happy to extend our support.

Best Regards,