Conversion of DWG to PNG cuts off file

When I go to convert a .DWG CAD file to a .PNG image part of the image on the right side gets cut off during conversion. I’ve tried changing the height/width of the image and it still cuts off the image, but makes it smaller. Below is my code I am using and attached is a folder with the .DWG file and a screenshot of the result:

string infile = _configuratiuon["FilePath"] + drawing + ".dwg";
            string dataDir = AppDomain.CurrentDomain.GetData("DataDirectory").ToString();
            string outfile = Path.Combine(dataDir, drawing + ".png");

            using (Converter converter = new(infile))
            {
                SavePageStream getPageStream = page => new FileStream(string.Format(outfile, page), FileMode.Create);

                // Set the convert options for PNG format
                var options = new ImageConvertOptions { 
                    Format = ImageFileType.Png,
                    Height = 1000,
                    Width = 1400

                };
                // Convert to PNG format
                converter.Convert(getPageStream, options);
            }

ProblemFiles.7z (23.5 KB)

1 Like

@mattczajka

This issue is reproduced at our end. We have logged it in our internal issue tracking system with ID CONVERSIONNET-5045. It’ll be now further investigated. You’ll be notified about the outcomes.

The issues you have found earlier (filed as CONVERSIONNET-5045) have been fixed in this update. This message was posted using Bugs notification tool by nikola.yankov