RTF to PDF conversion stopping on page

Hello

I have a file that I’m using to test RTF to PDF/Docx conversion. When I run it using the recommended code, It stops on page 6 out of 20. I suspected it had to do with the actual RTF, so I opened the RTF, copied the contents into a new RTF and ran the same code and worked successfully. Anyone run into this issue before?

The code that I am using is the following:

using (Stream stream = File.OpenRead(file))
{
    Document doc = new Document(stream);
    doc.Protect(ProtectionType.NoProtection);
    int pageCount = doc.PageCount;
    doc.Save(outputFile, SaveFormat.Docx);
}

@sergio.passalacqua Could you please attach your problematic input and output documents here for testing? We will check the issue and provide you more information.

Alexey

The file has sensitive information in it. Let me see what I can do to clean it up without affecting it and to make sure it exhibits the same issue I saw.

image759401.png (3.69 KB)

@sergio.passalacqua Thank you for additional information. Please note it is safe to attach documents in the forum. Only you and Aspose staff can download your files. We will wait for you inputs.