Free Support Forum -

'System.ArgumentNullException: Value cannot be null.' exception when saving .docx as .pdf


I get the following exception when I am trying to convert attached document to pdf:

System.ArgumentNullException: Value cannot be null.
Parameter name: value
at Aspose.Words.Font.set_Style(Style value)
at ⚯.⚮.⛍(Font ԡ, String Ԡ, ߗ ਨ, Boolean ⛋)
at ⚯.⚮.⛈(Font ԡ, String Ԡ, ߗ ਨ, Boolean ⛉, Boolean ⛊, Boolean ⛋)
at ⚯.⚮.DoTab(Font font)
at ᵗ.⛢.⛳(String Ԡ, Font ԡ)
at ⚯.⚮.VisitRun(Run run)
at Aspose.Words.Run.Accept(DocumentVisitor visitor)
at Aspose.Words.CompositeNode.ࡤ(DocumentVisitor ࡥ)
at Aspose.Words.Paragraph.Accept(DocumentVisitor visitor)
at Aspose.Words.CompositeNode.ࡤ(DocumentVisitor ࡥ)
at Aspose.Words.Body.Accept(DocumentVisitor visitor)
at ⚯.⚮.♆(Section ჻)
at ⚯.⚮.♂(☢ ☡)
at Aspose.Words.Document.Save(String fileName, SaveFormat fileFormat)

I am using latest Aspose.Words.

The code I use (last line fails):

Dim AsposeDocument As Aspose.Words.Document

AsposeDocument = New Aspose.Words.Document(FromFileName, Aspose.Words.LoadFormat.Docx, "")

AsposeDocument.Save(XmlFileName, Aspose.Words.SaveFormat.AsposePdf)

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

Thanks for your request. It seems to be a known issue #4892. Unfortunately it is unresolved yet. I will notify you as soon as it is fixed.

Best regards.

The issues you have found earlier (filed as 4892) have been fixed in this update.