Skip to content

Conversation

@GOPINATH-SF4767
Copy link
Collaborator

Description:
Added sample for Convert RTF string to HTML string using DocIO.

{
public static void Main(string[] args)
{
var rtfString = @"{\rtf1\ansi\deff0 {\fonttbl {\f0 Times New Roman;}}\f0\fs60 Hello World!}";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use proper data type instead of var.

document.Close();
ms.Position = 0;
streamRTF.Close();
var htmlString = Encoding.ASCII.GetString(ms.ToArray());

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use proper data type instead of var.
Print html string in console

@MathanKumarVaradhaRajaPerumal MathanKumarVaradhaRajaPerumal merged commit a2afedd into main Jan 22, 2026
1 check failed
@MathanKumarVaradhaRajaPerumal MathanKumarVaradhaRajaPerumal deleted the 263711-RTFToHTML branch January 22, 2026 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants