Free Support Forum - aspose.com

Build Page Layout of Document & Convert DOCX to PDF using C# .NET - Manage System.NullReferenceException

Hi,

We have found another issue with the newest version of Aspose.Words.
This document works with 19.11, but not with later versions. See pdfIssue.zip (13.8 KB)

        var document = new Document(@"..\pdfIssue.docx");
        document.UpdatePageLayout();

        document.Save(@"..\pdfIssue.pdf");

Could you please advise?

Thanks,
Lukasz

@acturisaspose,

We tested the scenario and have managed to reproduce the same problem on our end. For the sake of correction, we have logged this problem in our issue tracking system. The ID of this issue is WORDSNET-19814. We will further look into the details of this problem and will keep you updated on the status of correction. We apologize for your inconvenience.

@awais.hafeez

Could you please tell me if there is any workaround for the issue?

Thanks,
Lukasz

@acturisaspose,

I am afraid, there is no workaround available at the moment. We will keep you posted and let you know when any workaround or any estimates ETA may be available in future. We apologize for any inconvenience.

@acturisaspose,

We have good news for you i.e. if everything goes by plan, we are very hopeful to fix this issue in the next release of Aspose.Words (20.2). But, I am afraid, there is no workaround available other than removing the UpdatePageLayout() call from the scenario. We will inform you here when 20.2 version will be released at the start of next month.

The issues you have found earlier (filed as WORDSNET-19814) have been fixed in this Aspose.Words for .NET 20.2 update and this Aspose.Words for Java 20.2 update.