Free Support Forum - aspose.com

Aspose.Words Font ArgumentException when saving in Html format

Hello,


We have been using Aspose.Words (8.0.0.0 fully licensed) to process 120,000 plus word documents and have run into a slight issue regarding fonts. Aspose is raising an “ArgumentException” with the message “Font 'Tempus Sans ITC' cannot be found.” where “Tempus Sans ITC” is a number of different fonts depending on the document being processed.

The process we are using takes a word document (doc, docx, rtf etc…), applies a page of extra information, and then saves the resulting document in three formats: document, text and Html. The error occurs when the process attempts to save the document in Html format, all other formats save without a problem. After examining a couple of example documents it would appear that the problem is caused by an un-recognised / missing font and WordArt.

What I was wondering is there a work around or someway I can provide Aspose an alternative Font to use? We are already removing all images from the document before saving (*) so losing the font on the WordArt would not potentially be a big issue.

(*) By removing shapes with ImageData (from previous forum example) and handling the “HtmlExportImageSaving” event.

I have provided a couple of anonymised example documents which will hopefully help with the investigation. Let me know if you need any more examples (we have a reasonably amount!) as I suspect the error won’t happen if the test machine has the “missing” font.

Many Thanks,

Martyn

Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your inquiry. We just released new version of Aspose.Words (8.1.0). Could you please try with new version? And let me know how it goes on your side. I cannot reproduce the problem with latest version.

You can download this version from here:

http://www.aspose.com/community/files/51/.net-components/aspose.words-for-.net/category1188.aspx

Best regards,

Hello,

Thanks for the very swift reply, I have re-tested the documents in question and yes that seems to have fixed the issue! :slight_smile:

Cheers,

Martyn