TX Text Control .NET for Windows Forms

Document Processing Examples

Topic

Documents that your code compares, imports, restyles or prints don't need an editor on the screen: the same work runs on the TextControl of a form or on a ServerTextControl, 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.

ExampleWhat it showsWhere
Document comparisonTwo 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#. .NET 8, version 33.0TXTextControl.Windows.Forms.Comparison
Excel importA sheet of an XLSX file loaded as a table with LoadSettings.DocumentPartName, as described in Loading and Processing Excel XLSX Spreadsheet Tables into TX Text Control using .NET C#. .NET 8, version 33.0TXTextControl.Windows.Forms.Excel.Import
Styles from a master templateThe ParagraphStyles and InlineStyles of a DOTX template copied into a DOCX document, as described in Applying and Updating Formatting Styles from Master Templates (DOTX) in DOCX Documents. .NET 8, version 33.0TXTextControl.Windows.Forms.MasterTemplate
Multipage TIFFEach frame of a multipage TIFF image placed on a page of its own, as described in Inserting Multipage TIFF Images into TX Text Control. .NET Framework 4.0, version 33.0TextControl.MultipageTIFF
Images from memoryA System.Drawing.Image inserted without a file, as described in Inserting Images from Memory. Visual Basic, version 33.0TextControl.WindowsForms.ImagesFromMemory
Markdown with MarkdigMarkdown converted to HTML with the Markdig library and loaded, as described in Loading Markdown Content into TX Text Control. Written before the package TXTextControl.Markdown.Core. .NET Framework 4.7.2, version 33.0TextControl.WindowsForms.Markdown
ServerTextControl diagnosticsA 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. A class without a projectTXTextControl.Diagnostics.ServerTextControlFactory

Document Editor Examples 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:

ExampleWhat it showsWhere
Text to table and backTab-separated text turned into a table, and a table into text. Windows FormsText to Table and Table to Text in TX Text Control and C#
Tables to tabsAn extension method that converts a table into tab-separated text. Windows FormsExtension Method: Converting Tables to Tabs in C#
Bulleted lists from plain textLines of plain text turned into a bulleted list. Windows FormsConvert Plain Text to Bulleted Lists in C# with .NET
Section breaksAll section breaks removed from a DOCX document. Windows FormsHow to Delete All Section Breaks in a DOCX Document using C#
Printing DOCXA DOCX document printed with ServerTextControl.Print, without Microsoft WordPrint MS Word DOCX Documents in .NET using C# Without Interop
CommentsThe comments of a DOCX document read with CommentedTextExtracting Comments from DOCX Files in .NET C#
SVG images of pagesThe pages of a DOCX document saved as SVG images with Page.GetImageConvert MS Word DOCX to SVG in .NET C#
MarkdownMarkdown loaded and saved with the package TXTextControl.Markdown.CoreIntroducing TXTextControl.Markdown.Core: Import and Export Markdown in TX Text Control

Next Steps