Free Support Forum - aspose.com

Variation in the word spacing when converting the Excel named range into SVG file for different devices

Dear Sir,

I am using Aspose.Cells.dll (version 18.10.2.0), to convert the Excel Named ranges into SVG image files.
The concern is:

I have one Excel Sheet, which contains some named ranges named as ‘Ex_28’, ‘Ex_5’ and all.
ExcelFile.zip (572.5 KB)

I am converting those named ranges in the SVG format image using Aspose.Cells. For that, I have written the following code.

AsposeCode.zip (1.5 KB)

The SVG image I am getting is proper as long as it is being rendered on the browser of desktop, using the tag in html. e.g.
I hosted that html page on the server and accessing the same web page on the mobile device. So, when it is being rendered on the mobile device’s browser, it varies in terms of word spacing and font-weight (not the proper bold).
The comparison is shown in the following file.
Comparison.zip (86.6 KB)

I don’t understand why the same SVG image renders properly on desktop’s browser and gets tampered when viewed on the mobile, browser.

P.S. I have tested the web page against Samsung Galaxy (Any version), Le 1s, Iphone 6 mobile devices.

Kindly, help me with this. I am expecting the “What you see is what you get” type of image for the named ranges of Excel.

Thanks and Regards

@yogeshrawle,

Thank you for the query.

Could you please host that html page on some server and share the link with us? We will observe that image using mobile device and provide our feedback after analysis.

@ahsaniqbalsidiqui
Dear sir,

We have created and hosted a demo app for your analysis.
URL: http://125.17.125.43/asposedemo

You can check the link in your mobile.

Things to notice:

  1. Open the Link of ID no. 189 (It is using some of the images that I provided you in the attached Excel file).
  2. The page will be opened which contains some Exhibits, Check the Exhibit 5 and Exhibit 28 images on the mobile device that makes difference in the word spacing, bold font, etc., which is not in the case of Desktop browser.
  3. Compare with Named range Ex_5 and Ex_28 in the same attached Excel file, before.

Please do the needful.

@yogeshrawle,

I have tested mentioned Exhibits on Android device and Desktop browser but I can not notice the differences. Could you please mention the version of Android, iOS and name of browsers which you are using to notice the difference. Also attach some screenshots explaining the problem you are facing.

@ahsaniqbalsidiqui

Dear Sir,
We have tested the Webpages on Android Lollipop and Oreo versions. Both are showing the images as per the screenshots I sent you.
The link is viewed for the ID 189.
AsposeScreenshots1.zip (383.9 KB)
AsposeScreenshots2.zip (368.3 KB)

Please do the needful.

We are using Google chrome on mobile device to test the same.

Thanks

@yogeshrawle,

We were able to observe the issue but we need to look into it more. We have logged the issue in our database for investigation and for a fix. Once, we will have some news for you, we will update you in this topic.

This issue has been logged as

CELLSNET-46442 - Converted SVG distorted while hosted on server and opened in Mobile phone chrome browser

@ahsaniqbalsidiqui

Dear Sir,
Thank you for your quick action. Awaiting for your update.

Thanks

@yogeshrawle,

To get same view as shown by Microsoft Excel, the generated SVG file need fonts that are used in source file (e.g. “Frutiger LT 55 Roman”, “Frutiger LT 45 Light”) to be installed. These fonts may be not installed in your mobile phone. Also, if you open the SVG file in a Desktop Chrome without these fonts being installed on that PC, the view will be also not right. We suggest you to use JPG/PNG image instead of SVG image on multi-platforms.

@ahsaniqbalsidiqui

Dear Sir,
Thank you very much for your suggestion. We are now managed to connect SVG image with the fonts kept in the custom folder. SVG is now able to read the font to render it’s text properly.

Thanks and Regards

@yogeshrawle,

Good to know that your issue is sorted out by installing the underlying fonts. Feel free to contact us any time if you need further help or have some other issue or queries, we will be happy to assist you soon.