IndentLevel rendering issue

Hello,

We are having some problems with cell indent level. I’ve attached a test workbook that contains cells having Indent Level to the left/right and the output as image and pdf. As you can observe the indentation is not like in the Excel workbook.

Here is the code used to render the workbook to PDF/PNG:

            var workbook = new Workbook(@“Book1.xlsx”);
workbook.Save(@“Book1.pdf”, SaveFormat.Pdf); //save as PDF
        <span style="color:blue;">var</span> imageOptions = <span style="color:blue;">new</span> <span style="color:#2b91af;">ImageOrPrintOptions</span>
                               {
                                   Quality = 100,
                                   VerticalResolution = 200,
                                   HorizontalResolution = 200,
                                   PrintingPage = <span style="color:#2b91af;">PrintingPageType</span>.IgnoreBlank,
                                   ImageFormat = <span style="color:#2b91af;">ImageFormat</span>.Png,
                                   OnePagePerSheet = <span style="color:blue;">true</span>
                               };

        <span style="color:blue;">var</span> worksheet = workbook.Worksheets[0];

        worksheet.PageSetup.PrintArea = <span style="color:blue;">string</span>.Format(<span style="color:#a31515;">"A1:D6"</span>);
        worksheet.PageSetup.TopMargin = 0;
        worksheet.PageSetup.LeftMargin = 0;
        worksheet.PageSetup.RightMargin = 0;
        worksheet.PageSetup.BottomMargin = 0;
        
        <span style="color:blue;">var</span> sheetRender = <span style="color:blue;">new</span> <span style="color:#2b91af;">SheetRender</span>(worksheet, imageOptions);

        sheetRender.ToImage(0, <span style="color:#a31515;">@"Book1.png"</span>);  //save as PNG image<br><br><br>Thank you,<br>Bogdan Rusu<br>IBM Romania.<br></pre><br>

Hi,

Thanks for your posting and using Aspose.Cells for .NET.

You are right. I was able to replicate this issue with your file using the code below with the latest version:
Aspose.Cells
for .NET v7.2.2.7



We have logged this issue in our database. We will look into this issue and fix it, once the issue is fixed or we have some other update for you, we will let you know asap.

This issue has been logged as CELLSNET-40839.

I have attached the output pdf and screenshot for a reference.

C#


string filePath = @“F:\Shak-Data-RW\Downloads\book1.xlsx”;


Workbook workbook = new Workbook(filePath);


workbook.Save(filePath + “.out.pdf”);


Screenshot: