# ConvertFrom-OfficeRtf

Converts RTF input to Word, HTML, PDF, or Markdown output.

Project

PSWriteOffice

PowerShell document automation across OfficeIMO's document, spreadsheet, presentation, PDF, Project, Access, EPUB, invoicing, and conversion engines.

[View on GitHub](https://github.com/EvotecIT/OfficeIMO/tree/master/PowerShell/PSWriteOffice) [Visit Website](#) [Releases](https://github.com/EvotecIT/PSWriteOffice/releases/tag/v3.0.5) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/PSWriteOffice/0.2.0)

Stars **725**

Forks **84**

Open issues **3**

Total downloads **5,231,343**

Release **OfficeIMO-v3.6.2**

Language: C# Updated: 2026-11-23

Cmdlet 

Aliases: ConvertFrom-Rtf

**Module**

`PSWriteOffice`

**Aliases**

`ConvertFrom-Rtf`

**Inputs**

`System.String`

**Outputs**

`OfficeIMO.Word.WordDocument` `System.String` `OfficeIMO.Pdf.PdfDocument` `System.IO.FileInfo`

**Source**

[ConvertFromOfficeRtfCommand.cs:45](https://github.com/EvotecIT/PSWriteOffice/blob/main/Sources/PSWriteOffice/Cmdlets/Rtf/ConvertFromOfficeRtfCommand.cs#L45) 

Converts RTF input to Word, HTML, PDF, or Markdown output.

## Syntax

```
ConvertFrom-OfficeRtf
-As <Word|Html|Pdf|Markdown>
[-ExcludeHeaderFooters]
[-ExcludeImages]
[-ExcludeNotes]
[-ExcludeTables]
[-FontFamily <String>]
[-IncludeDefaultCss]
[-IncludeFontStyles]
[-IncludeHiddenText]
[-IncludeListStyles]
[-IncludeParagraphClasses]
[-IncludeRunClasses]
[-NoUnsupportedHtmlComments]
[-OutputPath <String>]
[-PassThru]
[-Path] <String>
[-UseImagePaths]
[<CommonParameters>]
```

[#](#member-9a6577e1edac4260f17fe3db)

Parameter set: `Path`

```
ConvertFrom-OfficeRtf
-As <Word|Html|Pdf|Markdown>
[-ExcludeHeaderFooters]
[-ExcludeImages]
[-ExcludeNotes]
[-ExcludeTables]
[-FontFamily <String>]
[-IncludeDefaultCss]
[-IncludeFontStyles]
[-IncludeHiddenText]
[-IncludeListStyles]
[-IncludeParagraphClasses]
[-IncludeRunClasses]
[-NoUnsupportedHtmlComments]
[-OutputPath <String>]
[-PassThru]
-Text <String>
[-UseImagePaths]
[<CommonParameters>]
```

[#](#member-40fcb7c5eef4662f1f5d4932)

Parameter set: `Text`

## Examples

### Convert RTF to Word.

```powershell
New-OfficeRtf -Path .\Report.rtf -Text 'Summary', 'Ready for review'
ConvertFrom-OfficeRtf -Path .\Report.rtf -As Word -OutputPath .\Report.docx -PassThru
```

Loads the RTF file and saves a Word document using OfficeIMO.Word.Rtf.

### Convert RTF to HTML.

```powershell
ConvertFrom-OfficeRtf -Path .\Report.rtf -As Html -OutputPath .\Report.html
```

Converts RTF to Word, then serializes Word to HTML.

### Convert RTF to PDF.

```powershell
ConvertFrom-OfficeRtf -Path .\Report.rtf -As Pdf -OutputPath .\Report.pdf
```

Uses OfficeIMO.Rtf.Pdf to save a PDF file.

### Convert RTF to Markdown.

```powershell
ConvertFrom-OfficeRtf -Path .\Report.rtf -As Markdown -OutputPath .\Report.md -PassThru
```

Converts the RTF document to Markdown using OfficeIMO.Rtf.Markdown.

## Parameters

**-As OfficeRtfConversionTarget required**

Target document format.

Possible values: `Word`, `Html`, `Pdf`, `Markdown`

**-ExcludeHeaderFooters SwitchParameter optional**

Exclude RTF headers and footers from PDF output.

**-ExcludeImages SwitchParameter optional**

Exclude RTF images from PDF output.

**-ExcludeNotes SwitchParameter optional**

Exclude RTF notes from PDF output.

**-ExcludeTables SwitchParameter optional**

Exclude RTF tables from PDF output.

**-FontFamily String optional**

Optional font family for RTF to HTML conversion.

**-IncludeDefaultCss SwitchParameter optional**

Include the built-in default CSS for RTF to HTML conversion.

**-IncludeFontStyles SwitchParameter optional**

Include font styles as inline CSS for RTF to HTML conversion.

**-IncludeHiddenText SwitchParameter optional**

Include hidden RTF text when converting to PDF or Markdown.

**-IncludeListStyles SwitchParameter optional**

Include list style metadata for RTF to HTML conversion.

**-IncludeParagraphClasses SwitchParameter optional**

Emit paragraph styles as CSS classes for RTF to HTML conversion.

**-IncludeRunClasses SwitchParameter optional**

Emit run styles as CSS classes for RTF to HTML conversion.

**-NoUnsupportedHtmlComments SwitchParameter optional**

Do not emit HTML comments for unsupported RTF features when converting to Markdown.

**-OutputPath String optionalaliases: OutPath**

Optional output path. When omitted, the converted object or text is returned.

**-PassThru SwitchParameter optional**

Emit a FileInfo when saving to disk.

**-Path String requiredposition: 0pipeline: True (ByValue)aliases: FilePathsets: Path**

RTF file path.

**-UseImagePaths SwitchParameter optional**

Store image references as file paths instead of base64 data URIs for HTML output.

**-Text String requiredsets: Text**

Raw RTF text.

## Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see [about_CommonParameters](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

Evotec API Reference Copyright 2026 Evotec Services

<!-- PowerForge markdown artifact sha256:1E3144CE746B30CD17E7E087EB574FF141BE4267B84C94B16877B8410092CF69 -->
