"Arial narrow" font rendered as "Arial" when converting DOCX to PDF/HTML

Hi, I’ve come across a rendering issue when converting Word documents to xhtml (this also apply to pdf conversion).

If a document uses “Arial narrow” as a font, the text generated by Aspose is rendered with “Arial”.

Here’s a minimal reproduction document: ArialNarrow.docx (13.4 KB)

And here is a screenshot to help visualise the problem.

Let me know if you require more details.
Thanks in advance.

@njlgad

We have tested the scenario using the latest version of Aspose.Words for .NET 21.5 and have not found the shared issue. So, please use Aspose.Words for .NET 21.5. We have attached the output PDF and HTML with this post for your kind reference.

21.5.pdf (11.7 KB)HTML 21.5.zip (447 Bytes)

Thanks for this.
Turns out the problem was not with the version I was using (21.4) but because the server didn’t have the font installed.
Is there any way of knowing when a font couldn’t be loaded when using the API? any useful log?

Thanks in advance.

PS: I’ve used Convert Files Online - Word, PDF, HTML, JPG And Many More to generate the PDF, so the server(s) providing this service must also be missing the font.

@njlgad

Please note that Aspose.Words requires TrueType fonts when rendering document to fixed-page formats (JPEG, PNG, PDF or XPS). You need to install fonts that are used in your document on the machine where you are converting documents to PDF. Please refer to the following articles:

Using TrueType Fonts
Manipulating and Substitution TrueType Fonts

The ‘Arial narrow’ font is not installed on the system where 'Free online converter' demo does conversion. Please download and install the latest version of Aspose.Words for .NET 21.5 and install ‘Arial narrow’ on the machine where you want to convert DOCX to PDF. Please refer to the following article about document to PDF conversion.

Thanks for this.

In our case we decided to embed the font in the Word document instead of having to install it on the machine used to convert it.

@njlgad

While DOCX to PDF conversion, Aspose.Words tries to find the required font among the fonts embedded in the original document. So, you can use documents with embedded fonts for conversion.