@leoluo , this is looking good.
Thanks.
This is perfect, thanks.
Thank you for your feedback.
We’ll keep you informed with updates as soon as the new version becomes available.
@leoluo , I can’t confirm the font kerning fix is what I’m expecting as the output isn’t clear enough.
The placement of values around/within pie charts seems okay. I think I can work with it.
Font type issue, missing labels on bottom left chart are fixed, I can confirm.
Thank you for the feedback and confirmation. For the font fix, we will check whether we can give better solution for you to check and we will give feedback soon.
For issue:
CELLSNET-58039 The blue headers are rendered with unnecessary vertical lines - Sheet to image conversion
The cells are filled with same background. During rendering, we fill cell area cell by cell with the set background color. There is no gap between cells. However, the white lines(gap) appear between cells while with SmoothingMode.HighQuality option. We can’t fix the issue in this case.
@peyton.xu, I’m not sure I’m following what you explained. Is the white lines coming through because the border is not the same color as the background of the cell?
The white lines(gap) appear between cells when you set SmoothingMode.HighQuality option. Please don’t set SmoothingMode.HighQuality and it will work better.
Okay, I’ll try it out and get back to you. Thanks.
By the way, I tested using your template Excel file and following sample code (I removed the relevant line of code which sets SmoothingMode.HighQuality).
e.g.,
Sample code:
Workbook workbook = new Workbook("e:\\test2\\Chart_Template.xlsm");
// Access the worksheet
Worksheet worksheet = workbook.Worksheets["Summary"];
// Set the print area with your desired range in the worksheet
worksheet.PageSetup.PrintArea = "M10:AQ40";
worksheet.PageSetup.LeftMargin = 0;
worksheet.PageSetup.RightMargin = 0;
worksheet.PageSetup.TopMargin = 0;
worksheet.PageSetup.BottomMargin = 0;
// Clear any header/footer as they'll be captured when converting the worksheet to image
worksheet.PageSetup.ClearHeaderFooter();
// Set OnePagePerSheet option as true
ImageOrPrintOptions options = new ImageOrPrintOptions()
{
OnePagePerSheet = true,
ImageType = Aspose.Cells.Drawing.ImageType.OfficeCompatibleEmf,
HorizontalResolution = 100,
VerticalResolution = 100,
OnlyArea = true
};
// Take the image of your worksheet
SheetRender sr = new SheetRender(worksheet, options);
sr.ToImage(0, "e:\\test2\\out1.jpg");
Please find attached the output image which is fine tuned and I do not see white lines(gap) between cells.
out1.zip (44.5 KB)
@amjad.sahi, thank you for testing it out for me. I see the cause is that particular property. I’ll have to run the different charts we have to make sure disabling that property does not cause unacceptable outputs.
I started using that property as some of our charts have shapes that are small in size and when we render them, it looked pixelated. I was suggested this property to fix the issue.
I think you may try to use SmoothingMode attribute for all cases except for this particular case (where those white lines (gap) between cells are rendered).
Hi @JThomas98
About the font kerning, this might be the same issue as the font correction, the font kerning should be fixed when the font is corrected (as shown below, The spacing between numbers and percent signs becomes normal after font correction. I think this is because the character spacing is different in different fonts).
kerning.png (12.8 KB)
You can confirm it after using 25.4, and if there are any issues, please do feedback, we’ll continue to investigate.
@JThomas98
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): CELLSNET-58131
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
For the issue of the missing vertical line, we recorded it as CELLSNET-58131 and it has been fixed, the result is as follows, it will take effect in version 25.4.
MissingLineFix.png (17.8 KB)
The issue of font kerning I showed recently seems to be happening every time the letter ‘i’ is in the chart. Can yo make sure it’s not happening after this fix? Thanks.
Here is the screenshot of what I mean:
Test_04042025.zip (8.8 MB)
This is looking good. Thank you!
Workbook wb = new Workbook(dir + "Chart_Template.xlsm");
// Access the worksheet
Worksheet worksheet = wb.Worksheets["ExecSummary"];
// Set the print area with your desired range in the worksheet
worksheet.PageSetup.PrintArea = "C3:D16";
worksheet.PageSetup.LeftMargin = 0;
worksheet.PageSetup.RightMargin = 0;
worksheet.PageSetup.TopMargin = 0;
worksheet.PageSetup.BottomMargin = 0;
// Clear any header/footer as they'll be captured when converting the worksheet to image
worksheet.PageSetup.ClearHeaderFooter();
// Set OnePagePerSheet option as true
ImageOrPrintOptions options = new ImageOrPrintOptions()
{
OnePagePerSheet = true,
ImageType = Aspose.Cells.Drawing.ImageType.OfficeCompatibleEmf,
HorizontalResolution = 100,
VerticalResolution = 100,
OnlyArea = true
};
// Take the image of your worksheet
SheetRender sr = new SheetRender(worksheet, options);
sr.ToImage(0, dir +"dest.jpg");
Please check
dest.zip (7.6 KB)
generated by the above codes.
Could you share how to generate the screenshot?
This is to inform you that your issue (logged earlier as “CELLSNET-57940 - Horizontal and vertical labels are garbled when converting chart to image”) has been resolved. The fix/enhancement will be included in the next release (Aspose.Cells v25.4), scheduled for the release in this week. You will be notified as soon as the new version is released.