I use this snippet to convert dynamic XFA form to static form with Aspose.PDF .Net version 21.10.1.
using (var document = new Document(inFile))
// Check if input file is dynamic form, then we change it to static form
if (document.Form.Type == FormType.Dynamic)
document.Form.Type = FormType.Static;
inFile = tempFile;
This code works fine on Windows, but on Linux (Ubuntu 18.04) an exception was thrown with message
Object reference not set to an instance of an object.
Attached sample file and sample project.sample.zip (77.3 KB)
Can you investigate this issue and give me some advice?