Facing issue in Custom fonts from word to aspose pdf

Hi, I m trying to convert word document (generated locally) to pdf using asposewordscloud python . But the custom fonts used in word document is not reflected in the pdf. Is there any way aspose can take the custom from word and use it for pdf conversion.

@HPLINC

Please note to use custom fonts in the conversion, first, you need to upload the custom fonts to a storage folder and then pass the font folder path using fontsLocation query parameter in the request. Please feel free to contact us for any questions or concerns.

Whether we can use aspose storage folder itself to upload the custom font?

And also I need to know how to edit my existing code to specify fontsLocation. Sharing the word to pdf code below:
request = asposewordscloud.models.requests.ConvertDocumentRequest(
docbytes, file_format, None,
file_name, None, None)
result = self.aspose_api.convert_document(request)

@HPLINC

Yes, you can use Aspose Internal Cloud Storage folder for custom fonts as well. For example, I have a Fonts folder at the root of Aspose Internal Cloud Storage. So I will pass it in the request as following using the latest Aspose.Words Cloud SDK for Python. You may please check the ConvertDocumentRequest definition as well for more details.

request = asposewordscloud.models.requests.ConvertDocumentRequest(
docbytes, file_format, None,
file_name, None, None, None, None, 'Fonts')
result = self.aspose_api.convert_document(request)

@tilal.ahmad
Thanks for your reply. In aspose file storage, file is retained maximum for a a month.
image.png (33.4 KB)

Is there any way I can permanently store the file?

If not I have to go for s3 storage itself.
In case of s3 storage, the fontsLocation will be the s3 key right (the entire folder path where .ttf file is stored)?

Basically I can upload fonts that’s not available in aspose, rest of the fonts will work as usually right?
or I should upload even the aspose available fonts as well?

@HPLINC

Please note, the paid customers have an option to specify folder names to exclude from the file retentions settings. You can configure the Regexes to Retain Files Forever field to retain your required folder forever. Please check the sample screen shot for reference.

@tilal.ahmad Okay Thanks, will check it

1 Like