Convert DOCX to RTF with NET REST API

This short tutorial assists in how to Convert DOCX to RTF with NET REST API. Use the Aspose.Words for .NET Cloud SDK to develop DOCX to RTF converter with C# REST API. You can use many other features to work with this feature by exploring the SDK and customizing the process in any of the supported platforms.

Prerequisite

Steps to Convert DOCX to RTF with C# Low Code API

  1. Create the Configuration object and set the client secret and ID to convert DOCX to RTF
  2. Instantiate the WordsApi object with the defined configuration to perform the DOCX to RTF conversion
  3. Specify the source DOCX and the output RTF file files
  4. Load the input DOCX file and initialize the position
  5. Instantiate the ConvertDocumentRequest() method using the above file stream and format
  6. Call the ConvertDocument method to Convert DOCX to RTF using REST API
  7. Save the converted RTF file on the local disk

The above steps will yield to transform Word to RTF with C# Low Code API. We will commence by creating the WordsApi class instance with the Configuration object having the client ID and the secret followed by accessing the source DOCX file into a file stream and creating a ConvertDocumentRequest instance. Finally, we will use the WordsApi.ConvertDocument() method for generating the RTF file from the Word file.

Code to Convert DOCX to RTF with C# REST API

This example demonstrates the basis for changing DOCX to RTF with NET REST API. You can further customize the transformation by setting various parameters in the ConvertDocumentRequest() method which is set to null in this example code for now. The output file stream is saved to a local file however, you can also send it over a network or save it in the database as per your choice.

You may also check out another similar feature on the following page: How to convert DOC to PDF with NET REST API.

 English