Text space missing in rendered image

Hi,



When I rendered table to image I found there were space missing in the text.



Code:

var book = new Workbook(@“test.xlsx”);

Worksheet sheet = book.Worksheets[1];//the second sheet is the one I’m using for this test

var options = new ImageOrPrintOptions

{

ImageFormat = ImageFormat.Emf,

OnePagePerSheet = true



};

sheet.PageSetup.PrintArea = “A1:E7”;

SheetRender sr = new SheetRender(sheet, options);

sr.ToImage(0, @“testout.emf”);



I’ve also attached the output and test files. You can find the space between ‘B’ and ‘A’ in the first line is missing in the image. Could you please help me look into this?



Thanks,

Hi,


Thanks for your posting and using Aspose.Cells.

We were able to observe this issue and logged it in our database for a fix.

This issue has been logged as

  • CELLSNET-45259 - Text space missing in rendered emf image

Hi,

Thanks for using Aspose.Cells.

The cell "A1" in sheet "Sheet1" is "Eras Bold ITC" font and bold style. But only regular style "Eras Bold ITC" font is installed. Please install bold style "Eras Bold ITC" font if you have or change Cell A1 font to regular style.

Hi,


I am not quite sure I understand.
Eras Bold ITC is installed on my computer and any font can be set to bold or italic.
Copy pasting the cells using Excel and ‘Copy as Picture’ into Word produces the correct result.

Hi,


Thanks for your posting and using Aspose.Cells.

ServerSide527:
Hi,
Eras Bold ITC is installed on my computer and any font can be set to bold or italic.

Yes, in Microsoft Excel, any font can be set to bold or italic. But if bold style font is not installed and the font is set to bold style, we cannot measure the string width right. Currently, that cause the space missing especially when the length of the string/word is long.

Hi,


I understand, I do not believe Eras Bold ITC comes with a bold style for the font.
This does not change the fact however that it is possible to set it to bold in Excel/Word and that Office has no issues in generating a correct vector image from the text.
Although I understand why it is not working as expected currently, I still consider this a bug or at least a missing feature. The correct behaviour as demonstrated in Office is still expected from Aspose in this case.

Cheers,
Hi,

Thanks for your posting and using Aspose.Cells.

We found, this issue is still a bug and it needs to be fixed. We have logged your issue comment in our database for product team investigation. Once, there is some fix or other news for you, we will let you know asap.

@ServerSide527,

Please try our latest version/fix: Aspose.Cells for .NET v21.6.3 (attached)
Aspose.Cells21.6.3 For .Net2_AuthenticodeSigned.Zip (5.5 MB)
Aspose.Cells21.6.3 For .Net4.0.Zip (5.5 MB)
Aspose.Cells21.6.3 For .NetStandard20.Zip (5.5 MB)

Your issue should be fixed in it.

Let us know your feedback

The issues you have found earlier (filed as CELLSNET-45259) have been fixed in this update. This message was posted using Bugs notification tool by simon.zhao