I am testing Word to PDF conversions. I have no problem with TrueType fonts being correctly embedded in the output PDF as long as the fonts are installed on the machine where Aspose.Words is running. OpenType fonts however are never embedded in the PDF. Here is the code I am using for conversion:
PdfOptions opt = new PdfOptions(); opt.setTrueTypeFontsFolder("/usr/share/fonts/ttf"); Document doc = new Document("/tmp/input.doc", LoadFormat.AUTO, ""); doc.saveToPdf(0, doc.getPageCount(), "/tmp/output.pdf", opt);
There is no setOpenTypeFontsFolder method on PdfOptions so I am assuming that the OpenType fonts should live in the same directory as the TrueType fonts.
I have attached a zip file containing the example .doc and .otf file as well as the output.pdf I am seeing which does not contain the correct font. Am I missing something such as the correct place to put the .otf files? The platform I am using is RHEL4.