I’m using these in a program I’m developing to re-render charts:
Aspose.Slides 20.2
Aspose.Cells 20.2
System.Drawing 4.7
For some reason this issue happens ONLY when I’m using a 4K screen (I’m working from home where I have a 4K screen, generally I’ve used a 1080p screen) and rendering charts as EMF images. (The issue doesn’t happen when rendered as PNGs).
When the slideshow renders, for some reason the text becomes about 25% smaller. I’m expecting it to appear the same. This is with using all the same settings as we always have.
I’m using Windows 10 and have previously for all other renders.
Here are the ImageOrPrintOptions I’ve been using. But this issue works fine on a PC with a 1080p screen running the exact same code:
ImageOrPrintOptions options = new ImageOrPrintOptions();
options.OnePagePerSheet = true;
options.SetDesiredSize(width, height);
options.ImageType = Aspose.Cells.Drawing.ImageType.Emf;
options.PageCount = 1;
options.Transparent = true;
options.CheckWorkbookDefaultFont = true;
options.HorizontalResolution = (int)(horizontalRes);
options.VerticalResolution = (int)(verticalRes);
options.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAliasGridFit;
options.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
options.OnlyArea = true;
The height and width and resolution variables should be all the same as the original presentation. This program re-renders the selected charts with new data.
Here are some screenshots. I used a slide with big text that’s part of an embedded excel document as an example. The first screenshot is with EMFs rendered correct (on a 1080p screen) the second is a PNG version (Works the same no matter where you are) and the third is with the images set to EMF on a 4K screen. Besides the screen, the code is exactly the same. (The PNG has ImageType set to PNG).
Do you have any idea what might be causing this? Is there an setting we can set to prevent this?