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

Free Support Forum - aspose.com

DOC to PDF COnversion

We are trying to convert the doc generated through ASPOSE Word to PDF. Font is defaulted to GentiumBasic. We understood other font are not available in the server. Can you please advice on the below question

1. Whether ASPOSE word can take the font in .afm format
2. Whether .ttf font can be included as jar file.
3. We are licensed to ASPOSE total, whether fonts will be part of this license.



Hi Velprabu,


Thanks for your inquiry. I am afraid, we cannot embed all fonts in Aspose.Words’ jar as too many fonts will increase library’s size. Also, there are license restrictions with many fonts. The solution would be to place fonts in a directory in your solution and instruct Aspose.Words to look into that directory during rendering:
http://www.aspose.com/docs/display/wordsjava/How+to++Specify+True+Type+Fonts+Location

Secondly, could you please attach your input Word document and font file (font in .afm format) here for testing? We will investigate the issue on our end and provide you more information.

Best regards,

Find sample document and afm fonts attached.

Please advice if fonts can be placed in jar file and get it accessed by ASAPOSE

Hi Velprabu,


Thanks for your inquiry.

I have attached couple of PDF files here for your reference. These files were produced over Windows 7 machine (having standard fonts only) using Microsoft Word 2013 and Aspose.Words for .NET 14.8.0. The outputs seem identical. I suggest you please upgrade to the latest version from the following link:
http://www.aspose.com/community/files/51/.net-components/aspose.words-for-.net/default.aspx

Velprabu:
1. Whether ASPOSE word can take the font in .afm format
We are in communication with our development team and will get back to you soon,

Best regards,

Thanks for your reply.

We are using Aspose Word for java (not Aspose for .net)and also it is deployed in Unix operating system where not all windows fonts are available.

Hi Velprabu,

Please share the output PDF file showing the undesired behavior i.e. generated with Aspose.Words for Java 14.8.0 on your Unix machine here for our reference.

Aspose.Words requires TrueType fonts when rendering documents to fixed-page formats (PDF, XPS or SWF). Most likely this problem occurs when you use Aspose.Words on Linux or Mac OS or your MS Word template document uses fonts that are not present on your computer or Aspose.Words cannot locate fonts on your computer. If any of these is found to be the case, you can either copy True Type font files from a Windows machine or install a True Type font package on your machine. Also, you can use the FontSettings class to specify the location of the font files.

In addition, Aspose.Words always creates subsets of fonts upon converting to PDF. If Apsose.Words cannot find some font, it just uses an alternative font from available fonts.

Moreover, you can also try embedding fonts into the resulting PDF documents by using PdfSaveOptions.setEmbedFullFonts(booleanvalue).

I hope, this helps.

Best regards,

Hi Velprabu,


Thanks for being patient. In addition to my last reply, please note that currently Aspose.Words does not support .afm fonts during rendering. Your request has been linked to the appropriate issue (WORDSNET-4133) in our issue tracking system and you’ll be notified as soon as it is supported.

Best regards,

Please advice if PATH can be jar file in the below


FontSettings.setFontsFolder(PATH, false);

Eg:

arial.ttf, timenewroman.ttf are present inside customfont.jar
FontSettings.setFontsFolder(“c:\customfont.jar”, false);


Hi Velprabu,


Thanks for your inquiry. No. You can create a folder in your application, place all your fonts (arial.ttf, timenewroman.ttf etc) inside it and mention the path to that folder in setFontsFolder to pick fonts from.

Best regards,