We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Poor text edge quality when converting to PNG transparent background

        <a class="attachment" href="/uploads/discourse_instance3/67129">convert_1.png</a> (2.2 KB)

convert_2.png (5.5 KB)
convert_3.png (10.5 KB)
convert_4.png (9.9 KB)

        // Initialize ImageSaveOptions            
        var options = new ImageSaveOptions(Aspose.Html.Rendering.Image.ImageFormat.Png)
        {
            SmoothingMode = SmoothingMode.AntiAlias ,// .Default,
            HorizontalResolution = 300,
            VerticalResolution = 300,
            BackgroundColor = System.Drawing.Color.Transparent,
            


        };
        var pg = options.PageSetup;
        
        pg.AnyPage = new Aspose.Html.Drawing.Page(new Aspose.Html.Drawing.Size(512, 128));
        
        //options.ho
        string html = File.ReadAllText("测试html.txt");
        //Console.WriteLine(html);
        Converter.ConvertHTML(html,".", options, Path.Combine("convert.png"));

@hyzhyj

Would you kindly share your sample HTML file for our reference as well (in .zip format)? We will test the scenario in our environment and address it accordingly.