RTF Security Warnings

We have a scenario where we are converting an RTF file to PDF. The conversion process itself works correctly; however, we encountered a case where the source RTF file triggers two security warnings (screenshots attached).

The first warning states:
“Some content is blocked”
and requires the user to click either “Unblock” or “OK.”

The second warning states:
“This document contains code your security settings do not allow…”
and requires the user to click “OK.”

Because this process runs silently on a server, these dialog boxes cannot be interacted with and cause the conversion to hang. We are looking for a supported method to suppress, bypass, or otherwise handle these security prompts during automated execution.

Please advise on the recommended approach.


@ian.jenkins It looks like the warning are shown because RTF documents contain some suspicious macros. Aspose.Words does not run any macros in the document, so the warning will not be the problem upon converting RTF document to PDF using Aspose.Words. The macros will be simply ignored by Aspose.Words.

I wish that were the case, however, when I attempt to load the RTF file it just hangs infinitely.

This is the line that it hangs on:
Aspose.Words.Document document = new Aspose.Words.Document(inputPath);

@ian.jenkins Could you please zip and attach the problematic RTF document here for testing? We will check the issue and provide you more information.