PDF to TIFF on Linux "out of memory" exception

Hello I am using Aspose.Pdf v21.1 to convert PDF document pages to Tiff PdfSample.pdf (2.3 MB). The program runs on two OS - Windows Server and Linux / UNIX Ubuntu (Inferred).
On Windows it works pretty slow, but works (PDF to TIFF processing speed is too slow)
On Linux, no operation is performed and I’m receiving an error message:

System.OutOfMemoryException: Out of memory.

  • at System.Drawing.Graphics.get_ClipBounds()
  • at #=zDK6BvWQyWP3kUKY$YE_ZP2SqUT526n$b9WjQk18=.#=zYFcRd4uA1yw3(#=z91M5H3O8TV0XtCVXLGUhaGPhikWQ8aBAgA== #=zCZrcFA0=)
  • at #=zLNXFkb4EpseBcwMvmTIfnnFanJ0Rm5TM7NUJerr6GldfT9QvkQ==.#=zr2k99227_RV_(#=zZue$WINdUg3oHRscG064rvI50_86gpnHln7dVan_92zg #=zbDBwKlc=)*
  • at #=zVTd$FeAbX5TY7Koh6hwiOz6zjBF6FbutJK8ibNTy3wc8.#=z9od4YRF6F0Qo(#=zZue$WINdUg3oHRscG064rvI50_86gpnHln7dVan_92zg #=zbDBwKlc=)*
  • at #=zVTd$FeAbX5TY7Koh6hwiOz6zjBF6FbutJK8ibNTy3wc8.#=zGbFLmyk=(#=zZue$WINdUg3oHRscG064rvI50_86gpnHln7dVan_92zg #=zbDBwKlc=)*
  • at #=zv$$f5tC2A5kU$E4W81YGLbb2hOMY3NKAo5_FfljiqQ8A.#=zDnIEnvBRFA4r(#=zZue$WINdUg3oHRscG064rvI50_86gpnHln7dVan_92zg #=zbDBwKlc=, List`1 #=zwR0WlrmO6Zsm)*
  • at #=zv$$f5tC2A5kU$E4W81YGLbb2hOMY3NKAo5_FfljiqQ8A.#=z9q7UCkE=(#=z_h1Wv4h23xAzL2sgniI4AlJFsctZ #=zqhA38Iw=, #=z1XA5xQdtCYRfL0R0rtKDavQDECST3_8zjA== #=zcPnyEPM=, #=z3AXh6KtNIg7GyS66nJhaeDYC1OfldkMZzzPcmTs= #=zgiphYF4=, #=zZue$WINdUg3oHRscG064rvI50_86gpnHln7dVan_92zg #=zbDBwKlc=)*
  • at #=zLNXFkb4EpseBcwMvmTIfnnFanJ0Rm5TM7NUJerr6GldfT9QvkQ==.#=zr2k99227_RV_(#=zZue$WINdUg3oHRscG064rvI50_86gpnHln7dVan_92zg #=zbDBwKlc=)*
  • at #=zVTd$FeAbX5TY7Koh6hwiOz6zjBF6FbutJK8ibNTy3wc8.#=z9od4YRF6F0Qo(#=zZue$WINdUg3oHRscG064rvI50_86gpnHln7dVan_92zg #=zbDBwKlc=)*
  • at #=zVTd$FeAbX5TY7Koh6hwiOz6zjBF6FbutJK8ibNTy3wc8.#=zGbFLmyk=(#=zZue$WINdUg3oHRscG064rvI50_86gpnHln7dVan_92zg #=zbDBwKlc=)*
  • at #=zv$$f5tC2A5kU$E4W81YGLbb2hOMY3NKAo5_FfljiqQ8A.#=zDnIEnvBRFA4r(#=zZue$WINdUg3oHRscG064rvI50_86gpnHln7dVan_92zg #=zbDBwKlc=, List`1 #=zwR0WlrmO6Zsm)*
  • at #=zv$$f5tC2A5kU$E4W81YGLbb2hOMY3NKAo5_FfljiqQ8A.#=z9q7UCkE=(#=z_h1Wv4h23xAzL2sgniI4AlJFsctZ #=zqhA38Iw=, #=zShRkjCpo$3KTp7XXB7mpChSejOSjPA8_0g== #=zJg4ocDw=, #=zkGq50eee8IMAp5dWhTsYC1pJ1sdgc1u5LDrZKYw= #=z1iRjBxc=, #=zZue$WINdUg3oHRscG064rvI50_86gpnHln7dVan_92zg& #=zbDBwKlc=)*
  • at #=zpdok518szO90bbZlVn$QijA$qzpl.#=z6gm2kVc=(#=zZue$WINdUg3oHRscG064rvI50_86gpnHln7dVan_92zg& #=zbDBwKlc=)*
  • at Aspose.Pdf.Devices.TiffDevice.Process(Document document, Int32 fromPage, Int32 toPage, Stream output)*
  • at Aspose.Pdf.Devices.DocumentDevice.Process(Document document, Int32 fromPage, Int32 toPage, String outputFileName)*

Code used C#:

        using (var pdfDocument = new Document(pdfFile))
        {
            var resolution = new Resolution(300);

            var tiffSettings = new TiffSettings
            {
                Compression = CompressionType.CCITT4,
                Depth = ColorDepth.Default,
                Shape = ShapeType.Portrait,
                SkipBlankPages = false
            };

            var tiffDevice = new TiffDevice(resolution, tiffSettings);
            var pages = pdfDocument.Pages;
            var pgCount = pages.Count;

            for (var pg = startPage; pg <= endPage; pg++)
            {
                var tifFile = Path.Combine(outFolder, $"{fileName}_F{pg}.tif");

                tiffDevice.Process(pdfDocument, pg, pg, tifFile);
            }

            pdfDocument.Dispose();
        }

Is there any solution for this issue and how fast it will be fixed in a new Aspose.Pdf version?

@dfasergey

We have logged another issue as PDFNET-49293 in our issue tracking system for this case of yours after reproducing it at our end. We are afraid that we cannot share any promising ETA at the moment for issues fixes as both of your issues have just been logged and will be resolved on a first come first serve basis. You will be certainly notified as soon as we have some updates regarding resolution of the issues. Please be patient and spare us some time.

We apologize for the inconvenience.

The issues you have found earlier (filed as PDFNET-49287) have been fixed in Aspose.PDF for .NET 23.9.