# Document Processing Examples

> Samples that process documents in code with TX Text Control .NET for Windows Forms: comparison, Excel import, styles, images, printing and ServerTextControl.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Documentation
- **Kind:** Topic
- **Path:** TX Text Control .NET for Windows Forms > Examples > Document Processing Examples
- **1535 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/examples/document-processing/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/examples/document-processing/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/examples/document-processing/llms-full.txt

---

Documents that your code compares, imports, restyles or prints don't need an editor on the screen: the same work runs on the [TextControl](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/llms-full.txt) of a form or on a [ServerTextControl](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/servertextcontrol/llms-full.txt), which has the same programming interface without a user interface. The samples and articles below show such tasks in Windows Forms projects, together with articles whose code works in any .NET product of TX Text Control.

### Sample Projects

All projects are Windows Forms applications in C#, unless the table says Visual Basic. The version is the one the project references today; the code often dates from the year of the article.

| Example | What it shows | Where |
|---|---|---|
| Document comparison | Two documents compared word by word, with the differences marked as tracked changes, as described in [Word-based Document Comparison and Track Changes Using TX Text Control and C#](https://www.textcontrol.com/blog/2024/05/02/word-based-document-comparison-and-track-changes-using-tx-text-control-and-c-sharp/). .NET 8, version 33.0 | [TXTextControl.Windows.Forms.Comparison](https://github.com/TextControl/TXTextControl.Windows.Forms.Comparison) |
| Excel import | A sheet of an XLSX file loaded as a table with [LoadSettings.DocumentPartName](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/loadsettings/documentpartname-property/llms-full.txt), as described in [Loading and Processing Excel XLSX Spreadsheet Tables into TX Text Control using .NET C#](https://www.textcontrol.com/blog/2024/10/16/loading-and-processing-excel-spreadsheet-tables-into-tx-text-control-using-net-csharp/). .NET 8, version 33.0 | [TXTextControl.Windows.Forms.Excel.Import](https://github.com/TextControl/TXTextControl.Windows.Forms.Excel.Import) |
| Styles from a master template | The [ParagraphStyles](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/paragraphstyles-property/llms-full.txt) and [InlineStyles](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/inlinestyles-property/llms-full.txt) of a DOTX template copied into a DOCX document, as described in [Applying and Updating Formatting Styles from Master Templates (DOTX) in DOCX Documents](https://www.textcontrol.com/blog/2024/10/10/applying-and-updating-formatting-styles-from-master-templates-dotx-in-docx-documents/). .NET 8, version 33.0 | [TXTextControl.Windows.Forms.MasterTemplate](https://github.com/TextControl/TXTextControl.Windows.Forms.MasterTemplate) |
| Multipage TIFF | Each frame of a multipage TIFF image placed on a page of its own, as described in [Inserting Multipage TIFF Images into TX Text Control](https://www.textcontrol.com/blog/2015/09/25/inserting-multipage-tiff-images-into-tx-text-control/). .NET Framework 4.0, version 33.0 | [TextControl.MultipageTIFF](https://github.com/TextControl/TextControl.MultipageTIFF) |
| Images from memory | A `System.Drawing.Image` inserted without a file, as described in [Inserting Images from Memory](https://www.textcontrol.com/blog/2006/05/18/inserting-images-from-memory/). Visual Basic, version 33.0 | [TextControl.WindowsForms.ImagesFromMemory](https://github.com/TextControl/TextControl.WindowsForms.ImagesFromMemory) |
| Markdown with Markdig | Markdown converted to HTML with the Markdig library and loaded, as described in [Loading Markdown Content into TX Text Control](https://www.textcontrol.com/blog/2020/06/26/loading-markdown-into-tx-text-control/). Written before the package `TXTextControl.Markdown.Core`. .NET Framework 4.7.2, version 33.0 | [TextControl.WindowsForms.Markdown](https://github.com/TextControl/TextControl.WindowsForms.Markdown) |
| ServerTextControl diagnostics | A factory that counts the `ServerTextControl` instances of an application and the handles they use, and disposes them, as described in [Diagnostics: When Calling ServerTextControl.Create() Failed](https://www.textcontrol.com/blog/2022/06/29/diagnostics-when-calling-servertextcontrolcreate-fails/). A class without a project | [TXTextControl.Diagnostics.ServerTextControlFactory](https://github.com/TextControl/TXTextControl.Diagnostics.ServerTextControlFactory) |

[Document Editor Examples](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/examples/document-editor/llms-full.txt) lists further samples that change a document in the editor, such as styles, tables of contents, watermarks and printing.

### Blog Articles With Code

These articles contain their code in the article. Those marked Windows Forms use the `TextControl` of a form; the others use `ServerTextControl`, which is part of TX Text Control .NET for Windows Forms as well:

| Example | What it shows | Where |
|---|---|---|
| Text to table and back | Tab-separated text turned into a table, and a table into text. Windows Forms | [Text to Table and Table to Text in TX Text Control and C#](https://www.textcontrol.com/blog/2024/06/26/text-to-table-and-table-to-text-in-tx-text-control-and-csharp/) |
| Tables to tabs | An extension method that converts a table into tab-separated text. Windows Forms | [Extension Method: Converting Tables to Tabs in C#](https://www.textcontrol.com/blog/2023/03/16/extension-method-converting-tables-to-tabs-in-csharp/) |
| Bulleted lists from plain text | Lines of plain text turned into a bulleted list. Windows Forms | [Convert Plain Text to Bulleted Lists in C# with .NET](https://www.textcontrol.com/blog/2025/01/21/convert-plain-text-to-bulleted-lists-in-csharp-with-dotnet/) |
| Section breaks | All section breaks removed from a DOCX document. Windows Forms | [How to Delete All Section Breaks in a DOCX Document using C#](https://www.textcontrol.com/blog/2023/11/21/how-to-delete-all-section-breaks-in-a-docx-document-using-csharp/) |
| Printing DOCX | A DOCX document printed with [ServerTextControl.Print](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/servertextcontrol/print-method/llms-full.txt), without Microsoft Word | [Print MS Word DOCX Documents in .NET using C# Without Interop](https://www.textcontrol.com/blog/2024/06/28/print-ms-word-docx-documents-in-net-using-c-sharp-without-interop/) |
| Comments | The comments of a DOCX document read with [CommentedText](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/commentedtext/llms-full.txt) | [Extracting Comments from DOCX Files in .NET C#](https://www.textcontrol.com/blog/2025/01/17/extracting-comments-from-docx-files-in-net-csharp/) |
| SVG images of pages | The pages of a DOCX document saved as SVG images with [Page.GetImage](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/page/getimage-method/llms-full.txt) | [Convert MS Word DOCX to SVG in .NET C#](https://www.textcontrol.com/blog/2024/12/30/convert-ms-word-docx-to-svg-in-net-csharp/) |
| Markdown | Markdown loaded and saved with the package `TXTextControl.Markdown.Core` | [Introducing TXTextControl.Markdown.Core: Import and Export Markdown in TX Text Control](https://www.textcontrol.com/blog/2025/09/16/introducing-txtextcontrol-markdown-core-import-and-export-markdown-in-tx-text-control/) |

### Next Steps

- [Document Processing](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/document-processing/llms-full.txt): create, load, change and save documents in code.
- [Mail Merge Examples](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/examples/mail-merge/llms-full.txt): documents created from templates and data.
- [GitHub Examples](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/examples/github/llms-full.txt): run a sample and update it to the current version.

---

## Nearby

- **Previous:** [Ribbon and Sidebar Examples](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/examples/ribbon-sidebar/llms-full.txt)
- **Next:** [Mail Merge Examples](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/examples/mail-merge/llms-full.txt)
