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

Free Support Forum - aspose.com

SVG to PDF Custom Font Issue


We are trying to use SVG as an HTML Fragment and include the same in PDF file.
The inclusion is happening but the custom font that we are trying to apply to the SVG text is not working.

Attached is the java code and the generated PDF file for your reference.
As we can see along with the SVG code an HTML code is also included in the PDF.Both have the font family specified for them.But the font is getting applied only on the HTML text and not on the SVG text.
SVG Text by default is taking Arial.

Please provide resolution for the same.

The aspose PDF version we are using is

Hi Robert,

Thanks for your inquriy. I have tested your code snippet with “Calibri” font using Aspose.Pdf for Java 17.1.0 and unable to notice reported issue. Please download and try latest version of Aspose.Pdf for Java, hopefully it will resolve the issue. However if the issue persist, then please share your sample font here as well, so we will further investigate the issue and will guide you accordingly.

Best Regards,