RTFExporter 1.1.4

dotnet add package RTFExporter --version 1.1.4
NuGet\Install-Package RTFExporter -Version 1.1.4
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="RTFExporter" Version="1.1.4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add RTFExporter --version 1.1.4
#r "nuget: RTFExporter, 1.1.4"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install RTFExporter as a Cake Addin
#addin nuget:?package=RTFExporter&version=1.1.4

// Install RTFExporter as a Cake Tool
#tool nuget:?package=RTFExporter&version=1.1.4

RTFExporter

NuGet Version C# Version Framework Version .NETFramework Version

A C# library to generate .RTF text files from any string object data, stylized and ready for any text processor. No fancy dependencies or restrictive licenses.


Simple usage

IDisposable style:

using RTFExporter;

public class Example {

    public void IDisposableExample() {

        using (RTFDocument doc = new RTFDocument("example.rtf")) {
            var p = doc.AppendParagraph();

            p.style.alignment = Alignment.Center;
            p.style.indent = new Indent(1, 0, 0);
            p.style.spaceAfter = 400;

            var t = p.AppendText("One: Don't pick up the phone\n");
            t.content += "You know he's only callin' 'cause he's drunk and alone";

            t.style.bold = true;
            t.style.color = new Color(255, 0, 0);
            t.style.fontFamily = "Courier";
        }

    }

}

String style:

using RTFExporter;

public class Example {

    public void StringExample() {

        RTFDocument doc = new RTFDocument();
        RTFParagraph p = new RTFParagraph(doc);

        RTFText t1 = new RTFText(p, "Two: Don't let him in\n");
        t1.SetStyle(new Color(255, 0, 0), 18, "Helv");

        RTFText t2 = new RTFText(p, "You'll have to kick him out again");
        t2.style = t1.style;

        string output = RTFParser.ToString(doc);

    }

}

Features

  • Document

    • Set page size
    • Set orientation
    • Set margin
    • Set units (inch, mm, cm)
  • Paragraph style

    • Set indent
    • Set text alignment
    • Set spacing
  • Text style

    • Set color
    • Set font family
    • Set font size
    • Set style: bold, italic, small caps, all caps, strike through and outline
    • Set 8 different types of underline

Missing

  • Parse a rtf file to RTFDocument object
  • Support to non-latin characters
  • Use stylesheets
  • Lists
  • And a lot more of RTF stuff

License (WTFPL-2.0)

WTFPL Badge

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.4 35,685 10/9/2020
1.1.3 497 5/2/2020
1.1.2 704 5/28/2019
1.1.1 682 11/14/2018
1.1.0 721 10/27/2018
1.0.2 796 8/13/2018
1.0.1 1,132 3/15/2018
1.0.0 863 3/15/2018

chore: Copyright update.