Pdf to Tifff conversion shwoing error some times

Hi,
While converting pdf to tiff some times we are getting this error. But if We try once again it convert the file. We are working in a batch process and it’s really a problem why some files are getting failed due to memory. we are using below code:

Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document(fileDetail.FileInfo.FullName);
Aspose.Pdf.Devices.Resolution resolution = new Aspose.Pdf.Devices.Resolution(300);
// Create TiffSettings object
Aspose.Pdf.Devices.TiffSettings tiffSettings = new Aspose.Pdf.Devices.TiffSettings();
tiffSettings.Compression = Aspose.Pdf.Devices.CompressionType.LZW;
tiffSettings.Depth = Aspose.Pdf.Devices.ColorDepth.Format8bpp;
//tiffSettings.Shape = ShapeType.Landscape;
//tiffSettings.SkipBlankPages = false;
        Aspose.Pdf.Devices.TiffDevice tiffDevice = new Aspose.Pdf.Devices.TiffDevice(resolution, tiffSettings);
        tiffDevice.Process(pdfDocument, fileDetail.OutputPath);
below is the error which we are facing. Due to privacy we can’t share the pdf.
System.OutOfMemoryException: Exception of type ‘System.OutOfMemoryException’ was thrown.
at #=zfzvLKm0wRT16Jh9TOuuGd07SUnpq6axLW4b_ot7S3vS5GowAbw==.Get8BppImage(Bitmap #=z3SUUUUi6zRv4)
at #=zfzvLKm0wRT16Jh9TOuuGd07SUnpq6axLW4b_ot7S3vS5GowAbw==.#=ziTQ$XuWhUeF3(Bitmap #=zYrK1SF4=, PixelFormat #=zFmwdgqo=)
at #=zfzvLKm0wRT16Jh9TOuuGd07SUnpq6axLW4b_ot7S3vS5GowAbw==.#=z6gcVYww2iG5b(Bitmap #=zYrK1SF4=, Int32 #=z4HQduvg=, Int32 #=zzRuaWkQ=)
at #=zfzvLKm0wRT16Jh9TOuuGd07SUnpq6axLW4b_ot7S3vS5GowAbw==.#=zVMFoKoE=(Bitmap #=zJ_zzFf4=)
at Aspose.Pdf.Devices.TiffDevice.Process(Document document, Int32 fromPage, Int32 toPage, Stream output)
at Aspose.Pdf.Devices.DocumentDevice.Process(Document document, Stream output)
at Aspose.Pdf.Devices.DocumentDevice.Process(Document document, String outputFileName)

I wana know the reason and why its working in next attempt and how we can solve this.

@atyagi39

It is hard to determine the cause of the issue without replicating it in our environment. Please share the source PDF file so that we may try to reproduce the same on our end.

But you need to believe that if I try it next time its converting the pdf correctly.
BTW attach is the pdf where i faced this issue. Out of 30000 files i got this issue in 2000 files.
If Reprocess it its getting reprocessed.

Please check and let me know the possible reason for that.testpdf.pdf (497.8 KB)

@atyagi39

I can not reproduce the issue so I suggest you to upgrade to latest version and share your feedback with system details for our investigations.

I am using your latest version 21.8. Do you think you have upgrade for that as well.
As i told you It will come later. So I think there is a big memory leak in pdf part. I am running all type of conversions in parallel. In pdf only there is a problem. 70% of files are getting failed due to memory.
Please investigate it asap.
We are in tight deadlines and we need a quick solution on this.

@atyagi39

20.10.1 is currently the latest version of the API and we provide support on latest version basis. If you continue facing the issue with latest version then share a sample application for our investigations.

Hi,
So you think 20.10 is the latest version while we have downloaded the AsposeTotal .Net from your site which is showing 21.8 as latest version.
Is this a typo form your side or are we not on same page. FYI we are using dll option only. We are not calling API.
I would also like to know how this Aspose work. Does it make any API calls internally from dlls.

@atyagi39

Aspose.Total package contains the latest version at the time of creating that package. You can upgrade to latest version from Nuget and let us know if the issue occurs. The API performs all operations locally on your machine.