Text cut off at the bottom when converting to image

Hi,

When running the following code on the attached xlsx:

        var book = new Workbook("test.xlsx");
        Worksheet sheet = book.Worksheets[0]; 
        var options = new ImageOrPrintOptions
        {
            ImageFormat = ImageFormat.Emf,
            OnePagePerSheet = true

        };
        SheetRender sr = new SheetRender(sheet, options);
        sr.ToImage(0, output);

The output image has the bottom part of the first line cut off. You can see it by zooming in on the ‘g’, ‘p’ and ‘y’ characters.

test.zip (9.0 KB)

Cheers,

Hi,

Thanks for the sample code and details.

It looks like your attached zipped archive is corrupt as I could not extract the files from it. Could you make a new archive of the files and re-attach it here, we will check it soon.

Thank you.

Hi,

The zip extracts just fine here with 7zip. Maybe you can try using that?
Before we were able to attach Excel files to forum posts but that does not seem to be possible anymore.

I tried re-zipping with a different compression algorithm but both 7-Zip and Windows explorer seem to extract the files just fine:
test.zip (8.6 KB)

Cheers,

Hi,

Thanks for sharing the new zip archive containing the files.

I have managed to reproduce the issue as you have mentioned by using your sample code with your template file. I found that text is cut off at the bottom when converting Sheet to image file.

I have logged a ticket with an id :“CELLSNET-45450” for your issue.

We will look into it soon.

Thank you.

Hi,

Our product team has evaluated your issue further.
Well, comparing the output with the print view in Microsoft Excel manually, we found there is only 1 pixel difference in vertical location. I am afraid, we can’t fix it for now. A workaround can be increasing the row height with 1 pixel, then the output image will be ok.

Thank you.

Hi,

I will copy the same comment I posted on a related issue:

Cheers,

Hi,

Thanks for sharing further details.

I think your comments make sense. I have logged your concerns against your issue “CELLSNET-45450” into our database. Our concerned developer will evaluate it further.

Once we have any new information or update, we will share it with you.

Thank you.

@ServerSide527,

We did prioritize your issues as you availed “Enterprise Support” service. Please try our latest version: Aspose.Cells for .NET v18.3.

Your issues should be fixed in it.