Hello,
Using version 17.9.0.0 of Aspose CAD for .NET 4.0 library and the below code generates PNG file where the text is doubled overlapping as shown here after Comparison.PNG (104.9 KB)
Is there a way or different settings to avoid this?
private void Convert(string dwgSource, string pngTarget, string layout, string language)
{
using (var image = (CadImage)Image.Load(dwgSource))
{
var rasterizationOptions = new CadRasterizationOptions();
rasterizationOptions.Layouts = new string[] { layout };
rasterizationOptions.UnitType = UnitType.MicroInch;
rasterizationOptions.PageHeight = image.Height * 10;
rasterizationOptions.PageWidth = image.Width * 10;
rasterizationOptions.Layers.AddRange(image.Layers.Cast()
.Where(x => (x.Flags == 0 && x.Name != “INFO_FR” && x.Name != “INFO_NL”)
|| x.Name == string.Format(“INFO_{0}”, language.ToUpperInvariant()))
.Select(x => x.Name));
var options = new PngOptions();
options.ColorType = PngColorType.GrayscaleWithAlpha;
options.VectorRasterizationOptions = rasterizationOptions;
image.Save(pngTarget, options);
}
}