Issue: PDF Conversion from Word Template (.dotx) Results in e_document_conversion_incomplete

Hi everyone,
I am working on a task to generate a PDF from a Word template (.dotx). The workflow is:

  1. Retrieve the .dotx template from SQL Server (stored as binary).
  2. Populate the template using OpenXML Document with data from the database.
  3. Attempt to convert the filled document to PDF using PDFTron.
    However, the conversion process returns the status e_document_conversion_incomplete.
    Code Snippet:
using (var pdfdoc = new PDFDoc())
{
    var options = new pdftron.PDF.ConversionOptions();
    options.SetFileExtension(".dotx");

    wordStream.Position = 0;
    int length = checked((int)wordStream.Length);
    byte[] buffer = new byte[length];
    wordStream.Read(buffer, 0, length);

    MemoryFilter inData = new(length, false);
    var inDataBuffer = inData.GetBuffer();
    Buffer.BlockCopy(buffer, 0, inDataBuffer, 0, length);
    inData.SetAsInputFilter();

    var conversion = pdftron.PDF.Convert.StreamingPDFConversion(pdfdoc, inData, options);

    if (conversion.GetConversionStatus() != DocumentConversionResult.e_document_conversion_success)
    {
        throw new InvalidOperationException($"PDFTron conversion failed: {conversion.GetErrorString()}");
    }
}```
**What I have Checked:**
•	The input stream contains a valid .dotx file (header is correct, opens in Word).
•	The file extension is set to .dotx in the conversion options.
•	The PDFTron Office Conversion module is licensed and initialized.
**Questions:**
•	Has anyone successfully converted a .dotx to PDF using PDFTron?
•	Are there additional requirements or limitations for .dotx files?
•	Is there a recommended way to prepare the template before conversion?
•	What are common causes for **e_document_conversion_incomplete** in this scenario?

Any insights or suggestions would be greatly appreciated!
Thank you.
1 Like

Hello, I’m AiRon, an automated tech support bot :robot:
While you wait for one of our customer support representatives, I can help you with your question.


It seems like you’re encountering an issue with converting a .dotx Word template to a PDF using the Apryse (formerly PDFTron) SDK. The error e_document_conversion_incomplete indicates that the conversion process didn’t fully complete, which could be due to several reasons.

Some things you can try:

  • Ensure that the .dotx file is fully populated and saved as a valid .docx file before conversion. The conversion process might have issues with template files that are not fully converted to standard document formats.

  • Check if there are any unsupported features or content in the .dotx that might cause conversion issues. Sometimes complex elements in the template can lead to incomplete conversions.

  • Verify that the PDFTron library and all its dependencies are correctly initialized and that no exceptions are thrown during the setup.

  • Consider converting the populated .dotx file to a .docx format before sending it through the conversion process. This can often resolve issues related to template-specific content.

  • Review any error messages or logs returned by the conversion process for additional clues on what might be causing the incomplete conversion.




Here are some resources that might help you:



Hopefully, this helps you solve your problem while you wait for a human to get back to you.

1 Like

Hi Sujitkumar,

I hope you are doing well. Thanks for reaching out regarding this DOTX → PDF conversion that you’re attempting to perform with the PDFNet SDK. While I’d be happy to investigate this behavior, I’d ask that you provide the following information so that I can replicate the issue on my end:

  1. What version of the PDFNet SDK are you currently utilizing in your application (i.e. 11.6)?
  2. What .NET framework are you utilizing (i.e. .NET Framework, .NET Core)?
  3. Can you share a sample DOTX file(s) with which you see this conversion issue?

Thank you,
Kaden Rettig
Technical Support Engineer
Apryse Support Team

1 Like