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)