How to embed custom font in DOCX to PDF conversion in PHP using Aspose.Words REST API

Hi,


I’m trying to do a docx -> pdf conversion via the cloud using your supplied code libraries. It all works fine, but custom embedded fonts in the docx come back as Times. I’m using, basically, the following code for a local conversion.

$doc = new Aspose\Cloud\Words\Document('');
return $doc->convertLocalFile($input_docx, '', 'pdf');

Is there something I need to do to pass along fonts or to instruct the API to embed fonts from the doc? Or from the system itself? Sorry if this has been covered, I've searched through the forums a few times.

I can share a sample doc via private channels if needed, I can't post it to a public forum.

Thanks,
Patrick

Hi Patrick,

Yes, you are right. Most used fonts are supported and our developers are working on an algorithm to upload and use custom fonts. If you can share your sample document, this will help us know your required fonts.

Attaching documents in forums is safe as only you and Aspose staff will be able to access the attachments. If you still have any doubt, you can send it to me at muhammad.ijaz@aspose.com

Best Regards,

Thanks Muhammad, I’ve emailed you the document.

Best,
Patrick

Hi Patrick,

This issue has been logged into our issue tracking system as SAASWORDS-116. We will keep you updated on this issue in this thread.

Also, I did not receive the document yet. Can you please send it again?

Best Regards,

Hi Patrick,

Your sample document was received and attached with the respective issue. Thanks for your cooperation.

Best Regards,

@patrickpittman

Please note we have already implemented your requested feature. Now, we support custom fonts while processing documents. To use this feature just create a folder in cloud storage and upload your custom fonts to that folder. Later pass font folder path as query parameter fontsLocation in your API Request. This parameter will be used as fonts source.