Text is distorted after capturing image from excel on Linux server

After capturing image from excel sheet text of sheet is distorted in image file in linux server but it work fine on windows server.
Can you help us on it.

Linux image sample is :linux captured image.png (7.1 KB)

Windows image sample is : windows captured image.png (9.0 KB)

Explanation : in above linux server image Text Investments in have no space. But same thing in windows image looking perfect.
**

@ravikmr474,

Thanks for the screenshots.

  1. Please make sure the underlying fonts (used in the workbook) are available on the linux machine. You should first copy/install the font files (e.g., .ttf files) to your fonts folder and then configure the folder in code at the start (before using your program code), so the rendered image should use the right fonts for sheet to image feature.

  2. Please note, for rendering features (e.g. Excel to PDF, Sheet to image, etc.), Aspose.Cells only supports to render in 100% display settings to get accurate results. So, make sure that on linux machine, you should set 100% display settings for the os.

Still not working.

FYI: We are using emf file extension for capturing the image from excel and text is distorted
ImageOrPrintOptions options = new ImageOrPrintOptions();
options.setOnePagePerSheet(true);
options.setImageType(ImageType.EMF);

but its working fine when we use JPEG file extension.

Can you please suggest.

@ravikmr474,

Could you please share the generated EMF image which is only saved by latest Aspose.Cells version?
Also, do you insert image (generated by Aspose.Cells) into Word document?

Since you have no option to upload emf file directly so I only updated extension from emf to jpeg and upload here. Red mark are distorted text on image
This is the emf image generated on Linux machine:

Aspose.Cells version is : 23.2
Yes, we are inserting emf image into word document

@ravikmr474,

You can zip the EMF file and upload here.

Please try your scenario/case (i.e., convert worksheet to image) with latest version/fix: Aspose.Cells for Java 23.4 (Releases | Maven)
If you still find the issue with latest version/fix, kindly zip your input Excel file that you are using and provide us, we will check it soon.

I tried version 23.4 but issue still exist.

I have attached a zip with image and excel : Aspose-support.zip (13.9 KB)
that is generated on Linux machine.

@ravikmr474,

Please save to PDF format on your end and provide the output PDF generated on linux server as well. This may help to evaluate the issue.

@ravikmr474

Please make sure the Arial font files arial.ttf are same on your Windows and Linux.

Also, please share us Emf images generated on Windows and Linux by Aspose.Cells for Java 23.4. We need to compare the two images to analyze the issue.

Thanks @peyton.xu we replaced fonts with windows fonts and its working fine. Thanks again.

@ravikmr474,

Good to know that your issue is sorted out now. Feel free to write us back if you have further queries or comments.