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

Free Support Forum - aspose.com

Does Aspose.PDF follow OpenType or TrueType specification


We want to use “Arial Unicode MS” while convert html to pdf using Aspose.PDF. And we want to embed the font into pdf.
Does Aspose.PDF follow the rules and restrictions defined in the OpenType or TrueType specification? Can we use “Arial Unicode MS” in pdf file and embed font into pdf? Do you have suggestion for us?


You can achieve your requirements by using the below sample code snippet:

// Instantiate Document object
Document docc = new Document();
// Add a page to pages collection of PDF file
Page page = docc.getPages().add();
// Instantiate HtmlFragment with HTML contnets
HtmlFragment title = new HtmlFragment("<p style='font-family: Verdana'><b><i>Table contains text</i></b></p>");
//Font-family from 'Verdana' will be reset to 'Arial'
title.setTextState(new TextState("ArialUnicodeMS"));
// Save PDF file
dataDir = dataDir + "AddHTMLUsingDOMAndOverwrite_out.pdf";
// Save PDF file

Can you please explain a bit more about above question by sharing some rules list or online link reference? We will share our feedback with you accordingly.