Converting certain DWG to PNG is super slow in .NET

Converting the attached DWG to PNG, using GroupDocs.Viewer 24.3 is super slow.
I think I left it running for half an hour and it still didn’t complete.
400_B-PH 4ème ÉTAGE_Coffrage_CB.zip (751.1 KB)

Conversion to HTML is quite fast.

No special options were used.

        using (var viewer = new Viewer(documentPath))
        {
            CreatePageStream getPageStream = page => new FileStream(string.Format("Viewer{0}.png", page), FileMode.Create);
            var imgOptions = new PngViewOptions(getPageStream);
            viewer.View(imgOptions);
        }

The save problem seems to happen with GroupDocs.Conversion, when converting to PDF.
Can you please take a look at that too?

@Clemens_Pestuka

Thank you for attaching the file. I can reproduce this issue. To speed up the rendering you can try using the new option EnablePerformanceConversionMode:

using (var viewer = new Viewer(documentPath))
{
    CreatePageStream getPageStream = page => new FileStream(string.Format("Viewer{0}.png", page), FileMode.Create);
    var imgOptions = new PngViewOptions(getPageStream);
    imgOptions.CadOptions.EnablePerformanceConversionMode = true;
    viewer.View(imgOptions);
}

The rendering will be much faster but the quality will be lower.

We’ll investigate this issue and update you when we have any new information.

1 Like