Office Printer_Range guide_EM.PDF (3.4 MB)
Using the Aspose.PDF.Drawing 26.2.0 and the attached PDF.
When trying to save the document with DocSaveOptions.DocForm.DocX and Mode DocSaveOptions.RecognitionMode.EnhancedFlow, the Document Save method throws an “Object reference not set to an instance of an object” exception and the Save function fails.
The Save function succeeds with RecognitionMode.Textbox and RecognitionMode.Flow.
Here is a code to reproduce:
var doc = new Pdf.Document("Office Printer_Range guide_EM.PDF");
var docOptions = new DocSaveOptions
{
Format = DocSaveOptions.DocFormat.DocX,
Mode = DocSaveOptions.RecognitionMode.EnhancedFlow,
};
using var ms = new MemoryStream();
doc.Save(ms, docOptions); // Throws an exception.