Word to PDF error: System.NullReferenceException: Object reference not set to an instance of an object

Hi,
This is the error i’m getting when trying to save word as PDF using Aspose.Words.
Actually, let me explain you the scenario here…I have split a word document using ASPOSE.Words based on heading styles in to multiple documents. and As per to the requirement, I will have to combine all these documents using “ASPOSE.Words.Document.AppendDocument” and now trying to save this final document as PDF
(using this line of code ASPOSE.Words.Document.Save(filePath, Aspose.Words.SaveFormat.Pdf);).

At that time it is giving object reference not set to an instance of an object error. and here it is call stack:

at 㚮.䥯.get_䥱()
at 㚮.䥤.䥨(䥯 ⏢, ṟ 䖌)
at 㚮.䥤.䥭(ṟ 䖌, Int32 փ)
at 㚮.䥋.䥒()
at 㚮.䥋.䖳()
at 㚮.䖯.䖳()
at Ἕ.ӧ.䒵(Document ๗, Ө 㒱)
at Aspose.Words.Document.UpdatePageLayout()
at Aspose.Words.Document.get_ӧ()
at Aspose.Words.Document.Ԕ(Stream ԍ, String ԋ, SaveFormat ԕ)
at Aspose.Words.Document.Save(String fileName, SaveFormat fileFormat)

Please help me resolving this issue.
Thanks,
Ramakrishna

Hi

Thanks for your request. Could you please attach your input document here for testing? I will check the problem on my side and provide you more information.

Best regards,