Embedding fonts in PPTX to SVG Conversion using PHP

I’m trying to convert a PPTX file to a SVG but I’ve noticed that some fonts aren’t correctly processed.

I’ve seen that I can specify custom fonts when converting, but that seems to be limited to PutSlidesConvert

(the examples are mostly broken by the way, Android example defines fontsLocation but doesn’t use it)

As I want to convert to SVG I can’t use this.

I then saw in this forum, that you support embedded fonts (Convert PowerPoint Presentation slides to PNG with embedded fonts in Nodejs using Aspose.Slides REST API).

However, when I tried it, I saw that the font-family is sometimes set, and sometimes aren’t. I’m basically just calling GetSlideWithFormat to get a single slide as an SVG image.

You can see my examples along with a PNG containing some feedback here https://www.ortic.com/aspose_font_test.zip (PPTX with embedded font is too big to be attached to this message).

@remolaubacher

We are sorry for the inconvenience caused. We are able to reproduce the issue GET /slides/{name}/slides/{slideIndex}/saveAs/{format} API is ignoring the fontsFolder parameter. Our Development team is diagnosing the issue SLIDESCLOUD-401 and trying to fix it at the earliest. We will keep you updated on the progress here.

Can you give us any schedule for this? This is unfortunately quite a show stopper for us.
Do you have a list of available system fonts? Maybe there’s one that would work for us.

@remolaubacher

Can you give us any schedule for this? This is unfortunately quite a show stopper for us.
Do you have a list of available system fonts? Maybe there’s one that would work for us.

Please spare us some time we are working hard to fix this issue at the earliest. In case it takes some time we will share with you the list of available system fonts.

@mateensajjad @sohail.aspose according ot the status this problem should be resolved. However, it still seems to fail in some cases. I’ve attached a simple three slides powerpoint file and the SVG output. As you can see it says Arial in all places.

test-diab-14.zip (2.3 MB)
test-diab-output-14.zip (583.3 KB)

@remolaubacher

GET /slides/{name}/slides/{slideIndex}/saveAs/{format} API was not earlier supporting fontsFolder parameter but now it is. You can upload custom fonts to Cloud Storage and specify their path as value to fontsFolder parameter.

Alternatively, let us know the names of fonts that your input documents are using, we will upload those fonts to our Production server. If possible please share the font files.

@sohail.aspose okay thanks, will change the PHP SDK to support this. I’m just confused because it works for some files and it fails for others. I don’t want the fonts to be embedded in the SVG, I just want the right font name to show up in the SVG properties.

Using vectorize is also not an option as we need the text in the SVG too.

@remolaubacher

Alternatively, let us know the names of fonts that your input documents are using, we will upload those fonts to our Production server.

Would this option serve your purpose?

@sohail.aspose I’m not entirely sure what would be the consequence. I will check fontsFolder to see if it makes a difference and if it doesn’t help I’ll get back to you about this approach. Thanks!

1 Like

@sohail.aspose I tried to use the fontsFolder parameter, but it doesn’t seem to change anything. I actually can’t get any of the parameters to work. I’d also like to increase the DPI but it doesn’t have any impact: aspose-test.php · GitHub

If you want to try to see if uploading the fonts makes a different, these are the fonts we are using Source Sans 3 - Google Fonts

This is the call it makes (app sid and signature removed):

http://api.aspose.com/v1.1/slides/test.pptx/slides/1?appSid=APP_SID&format=svg&options%5BPicturesCompression%5D=Dpi330&options%5BJpegQuality%5D=90&options%5BDeletePicturesCroppedAreas%5D=1&fontsFolder=fonts&signature=SIGNATURE

With and without fonts, I get arial back.

If it helps, I can also send you a complete example you can run on the console. I just don’t want to upload those things to be available to the public.

@ortic

You are right fontsFolder parameter is not working. The API generates the same output document regardless I specify fontsFolder parameter value or not.

We are going to reopen this issue for further evaluation.

Source Sans 3 - Google Fonts will be deployed to Production Server by next week.