Convert DOCX with Digital Signature to PDF using C# .NET | Prevent 'Buffer Cannot Be Null. Parameter Name: Buffer' Error

Error in converting the attached file to pdf. I’m using current version 20.4.0 but its also happening from prior versions.

Code:
var outputFilePath = @“c:\test\output.pdf”;
var document = new Aspose.Words.Document(inputFilePath);
var saveFormat = Aspose.Words.SaveFormat.Pdf;
document.Save(outputFilePath, saveFormat);

Error:

System.ArgumentNullException
HResult=0x80004003
Message=Buffer cannot be null.
Parameter name: buffer
Source=mscorlib
StackTrace:
at System.IO.MemoryStream…ctor(Byte[] buffer, Boolean writable)
at System.IO.MemoryStream…ctor(Byte[] buffer)
at .( , , String , String , String , Byte[] )
at .(String , String , String , Byte[] , )
at .(SignatureLine )
at Aspose.Words.Drawing.SignatureLine.()
at ​ .(Shape )
at ​ .(Shape , ​ , ​ )
at ​ .(Shape , ​ , ​ , )
at ​ .( ​ , ​ , , Boolean )
at ​ .( ​ , ​ , Boolean )
at ​ .( ​ , ​ , Boolean )
at ​ .( ​ , Boolean )
at .(​ )
at .(​ )
at .( )
at . ​ ()
at .(​ , IList1 , IList1 )
at .(​ , IList1 , IList1 )
at .(​ , IList1 , IList1 )
at .()
at . ​ ( )
at .( )
at .( , ​ )
at .( , )
at . ​ ( )
at . ​ ( )
at Aspose.Words.Document.( )
at Aspose.Words.Document.(Stream , String , SaveOptions )
at Aspose.Words.Document.Save(String fileName, SaveOptions saveOptions)
at Aspose.Words.Document.Save(String fileName, SaveFormat saveFormat)

Signed.zip (147.4 KB)
Please see attached file

@eldridge,

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-20412. 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.

@eldridge,

We have good news for you i.e. WORDSNET-20412 has now been resolved. The fix of this issue will be included in the 20.6 (next version) of Aspose.Words. We will inform you via this thread as soon as the next version containing the fix of this issue will be released at the start of next month.

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