Shrink to fit on cells made text become smaller than normal in the rendered image

Hi,

When I set the cells in the excel sheet as ‘Shrink to fit’, I noticed the text became smaller than normal in the rendered image (even if the text doesn’t really need shrink and the text size is normal if copy&paste manually)
Code:

        var workbook = new Workbook(@"test.xlsx");
        var options = new ImageOrPrintOptions
        {
            ImageFormat = ImageFormat.Emf,
            OnlyArea = false,
            TextRenderingHint = TextRenderingHint.ClearTypeGridFit,
            OnePagePerSheet = true
        };
        var sheet = workbook.Worksheets[0];
        sheet.PageSetup.PrintArea = "B6:I15";
        sheet.PageSetup.Zoom = 100;
        sheet.PageSetup.LeftMargin =
            sheet.PageSetup.RightMargin = sheet.PageSetup.TopMargin = sheet.PageSetup.BottomMargin = sheet.PageSetup.HeaderMargin = sheet.PageSetup.FooterMargin = 0;

        SheetRender render = new SheetRender(sheet, options);
        render.ToImage(0, @"out.emf");

I’ve attached some screenshots and the test files for your reference, could you please look into this?

Thanks

image.png (30.7 KB)image.png (20.7 KB)
comparison.zip (33.2 KB)

@ServerSide527,

Thanks for the template file, sample code, screenshot and comparison document.

After an initial test, I am able to observe the issue as you mentioned by using your sample code and template file. I found that using shrink to fit on cells made text become slightly smaller than normal in the rendered image. I have logged a ticket with an id “CELLSNET-46000” for your issue. We need to evaluate your issue thoroughly and check if this is an issue which needs to be fixed or an expected behavior.

Once we have an update on it, we will let you know here.

@ServerSide527,

Please try our latest version/fix: Aspose.Cells for .NET v18.3.2

Your issue should (logged earlier as “CELLSNET-46000”) be fixed in it.

Let us know your feedback.

The issues you have found earlier (filed as CELLSNET-46000) have been fixed in Aspose.Cells for .NET 18.4. Please also check the document/article for your reference: Install Aspose Cells through NuGet|Documentation