We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

SVG Conversion With Japanese Characters Fails On Linux

Hello,
The following code works on Windows but creates jumbled text on Linux. Here is my code. Is there a workaround to get this to work on Linux?

Presentation presentation = null;

        using (presentation = new Presentation())
        {
            License license = new License();
            license.SetLicense("Aspose.Slides.lic");                
            chartSvg = "<svg xmlns:xlink='http://www.w3.org/1999/xlink' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 450' ><text x='20' y='20'>黎明期</text></svg>";

            ISvgImage svgImage = new SvgImage(chartSvg);
            var emfImage = presentation.Images.AddImage(svgImage);
         
            presentation.Slides[0].Shapes.AddPictureFrame(ShapeType.Rectangle, 10, 75, 800, 455, emfImage);
        
        }

        return presentation;

Thanks,
Scott

@Scott_E_Mic,
Welcome to our community! Thank you for the issue description. Please check the issue using the latest version of Aspose.Slides. If the issue persists, please share and specify the following:

  • output presentation file
  • screenshot showing what the result looks like on your side
  • Linux version

Thank you Andrey.
I am using Debian 10.
Aspose.Slides for .NET 19.10.0.

The following are the results for Debian and Windows. Windows displays the proper text.
Debian Results.PNG (358 Bytes)
Windows Results.PNG (726 Bytes)

These images are in the Powerpoint slide. I was not able to attach the Powerpoint files.

@Scott_E_Mic,
I got the same results using Aspose.Slides 19.10. But Aspose.Slides 21.7 produced the correct text in the SVG image. There were many updates after version 19.10. Please use the latest version.

Thanks Andrey. I upgraded to 21.7 and the image is correct!!! There is still an issue though. When I convert the slide to a thumbnail bitmap, I get the same jumbled text. Here is my code. I am just adding the 2 lines to the code from above.
ISlide slide = presentation.Slides[0];
Bitmap bmp = slide.GetThumbnail(new Size(1100, 736));
bmp.Save(@“C:\zzz\test.png”, System.Drawing.Imaging.ImageFormat.Png);

I include the image from the Powerpoint, which is correct, and the thumbnail which is jumbled.
PowerpointImage.PNG (475 Bytes)
ConvertedFromSlideImage.PNG (328 Bytes)

Hello Andrey,
Do you have any thoughts on my issue? I need to get the Powerpoint slide converted to a PNG. Hopefully there is a way to get this working using Japanese characters on Debian 10.

Thanks,
Scott

@Scott_E_Mic,
Thank you for the additional information. It will take me a while to check this. I will answer you as soon as possible.

@Scott_E_Mic,
I reproduced the problem with rendering these characters to the image and logged the issue with ID SLIDESNET-42748 in our tracking system. Our development team will investigate this case. You will be notified when this is fixed.

Thank you Andrey. This issue is becoming urgent. Would Aspose.SVG work in this scenario?

@Scott_E_Mic,
Our development team will do its best to fix this problem as well. It will take us a while to investigate a cause first. We will inform you of any news.

The issues you have found earlier (filed as SLIDESNET-42748) have been fixed in this update.