# Document Processing

> Process documents on the server with ServerTextControl: create, load and convert, format text, tables and images, fields, forms, comments, changes and pages.

- **Product:** TX Text Control .NET Server
- **Section:** Documentation
- **Kind:** Topic
- **Path:** TX Text Control .NET Server > Document Processing
- **1453 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/llms-full.txt

---

Reports generated overnight, contracts converted to PDF, uploads checked before they're stored: document processing happens on the server, in code, without a user interface. `ServerTextControl` creates, loads, changes, converts and saves documents in console applications, services and ASP.NET Core, with a part of its API for each element of a document, from text and paragraphs to tables, images, fields, form fields, comments and tracked changes.

If you haven't used `ServerTextControl` yet, start with [Getting Started: Document Processing](https://docs.textcontrol.com/tx-text-control-dotnet-server/getting-started/document-processing/llms-full.txt). The [ServerTextControl](https://docs.textcontrol.com/tx-text-control-dotnet-server/overview/components/servertextcontrol/llms-full.txt) page in the Overview explains what the component is and where it runs.

### How You Work With Documents on the Server

Code that processes a document goes through the same steps:

1. **Create an instance** of `ServerTextControl` and call `Create`.
2. **Get the document**: create it from pieces, or load it from a file, a byte array or a string.
3. **Change the document** through the collections of `ServerTextControl`: `Selection` and `Paragraphs` for text, `Tables`, `Images`, `TextFrames`, `HeadersAndFooters`, `Sections`, `FormFields`, `Comments`, `TrackedChanges` and the other collections for the other elements.
4. **Save the result** in the format you need, to a file, a byte array or a string, and dispose the instance.

The examples use the Core package `TXTextControl.TextControl.Core.SDK`, which runs on Windows and Linux. The code is the same with the Classic package `TXTextControl.TextControl.ASP.SDK`, which only runs on Windows. Where the two differ, as for printing, page images, XML documents and the DOC format, the difference is noted.

### Find the Right Page

| If you want to | Read |
|---|---|
| Create and dispose instances, set the page format of a new document and assemble documents from pieces | [Creating Documents](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/creating/llms-full.txt) |
| Load uploads and password-protected files, control the import or read document information | [Loading Documents](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/loading/llms-full.txt) |
| Convert many documents, save HTML with stylesheets, make PDF files smaller or leave out comments | [Saving and Converting Documents](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/saving-converting/llms-full.txt) |
| Select, find, replace and format text | [Text](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/text/llms-full.txt) |
| Align and space paragraphs, create paragraph styles and lists, write right to left | [Paragraphs](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/paragraphs/llms-full.txt) |
| Fill tables from data, format cells, calculate totals, split tables and convert tables to text | [Tables](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/tables/llms-full.txt) |
| Insert, position, find and extract images | [Images](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/images/llms-full.txt) |
| Add text frames, read and remove drawings | [Text Frames and Shapes](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/text-frames-shapes/llms-full.txt) |
| Add barcodes and QR codes, or work with charts | [Charts and Barcodes](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/charts-barcodes/llms-full.txt) |
| Add headers, footers and page numbers, or give parts of a document their own page layout | [Headers and Footers](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/headers-footers/llms-full.txt), [Sections](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/sections/llms-full.txt) |
| Insert footnotes or generate a table of contents | [Footnotes](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/footnotes/llms-full.txt), [Tables of Contents](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/tables-of-contents/llms-full.txt) |
| Work with text fields, Word fields, links and bookmarks | [Fields](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/fields/llms-full.txt) |
| Mark ranges of text with a name and data | [Subtext Parts](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/subtext-parts/llms-full.txt) |
| Create fillable forms, read their values and flatten them | [Form Fields](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/form-fields/llms-full.txt) |
| Read and fill MS Word forms with content controls | [Content Controls](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/content-controls/llms-full.txt) |
| Read, add and remove comments | [Comments](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/comments/llms-full.txt) |
| Accept and reject tracked changes | [Track Changes](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/track-changes/llms-full.txt) |
| Mark editable regions of protected documents | [Document Protection](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/protection/llms-full.txt) |
| Check spelling and hyphenate words | [Spell Checking and Hyphenation](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/spell-checking/llms-full.txt) |
| Count pages, find the page of text and render pages as SVG or multipage TIFF | [Pages](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/pages/llms-full.txt) |
| Find the differences between two documents | [Document Comparison](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/comparison/llms-full.txt) |
| Send documents to a printer | [Printing](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/printing/llms-full.txt) |
| React to loaded, created and deleted elements | [Events](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/events/llms-full.txt) |
| Validate form field values and change fields based on other fields | [Conditional Instructions](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/conditional-instructions/llms-full.txt) |
| Load XML files with their DTD and CSS and edit their elements | [XML Documents](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/xml/llms-full.txt) |
| Render the view, rulers, status bar and dialog boxes of a `ServerTextControl` as images | [Server Visualization](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/server-visualization/llms-full.txt) |

### Where to Start

1. [Creating Documents](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/creating/llms-full.txt): the lifecycle of an instance and the structure of a new document.
2. [Loading Documents](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/loading/llms-full.txt) and [Saving and Converting Documents](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/saving-converting/llms-full.txt): get documents in and out.
3. The page of the element you need, from the table above.

### Related Sections

- [Mail Merge and Reporting](https://docs.textcontrol.com/tx-text-control-dotnet-server/mail-merge/llms-full.txt): create documents from templates and data with `MailMerge`.
- [PDF Processing](https://docs.textcontrol.com/tx-text-control-dotnet-server/pdf/llms-full.txt): create PDF/A and PDF/UA documents, forms and attachments.
- [Document Editor](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-editor/llms-full.txt): let users edit the documents that your server creates.

---

## In This Section

- [Charts and Barcodes](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/charts-barcodes/llms-full.txt): Add QR codes and barcodes with TXBarcodeCore and BarcodeFrame, find, remove and export them as SVG, and insert ChartFrame charts bound to data on Windows.
- [Comments](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/comments/llms-full.txt): Add, list, export and remove DOCX comments with ServerTextControl: CommentedText, replies, CommentCollection in all text parts, JSON reports and events.
- [Document Comparison](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/comparison/llms-full.txt): Compare documents with TX Text Control: paragraph comparison with ServerTextControl, word and image comparison samples and tracked changes on the server.
- [Conditional Instructions](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/conditional-instructions/llms-full.txt): Validate forms in the Document Editor and Viewer with conditional instructions: Condition operators, And/Or groups, Instruction types and a booking form.
- [Content Controls](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/content-controls/llms-full.txt): Fill and read MS Word content controls in DOCX forms with ServerTextControl: ApplicationFieldFormat, FormField types and adapters that create content controls.
- [Creating Documents](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/creating/llms-full.txt): Create and dispose ServerTextControl instances, set page size and margins, build documents with Selection and Append, set DocumentSettings and check fonts.
- [Events](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/events/llms-full.txt): All events of ServerTextControl: document loading, created and deleted document elements, replaced fonts, spell checking, hyphenation and XML validation.
- [Fields](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/fields/llms-full.txt): Insert, find and remove fields with ServerTextControl: TextField, MS Word application fields, hypertext links, bookmarks, field adapters and conversion to text.
- [Footnotes](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/footnotes/llms-full.txt): Insert, number, read, format and remove footnotes with ServerTextControl: the Footnote class, FootnoteCollection, NumberFormat, FootnoteText and file formats.
- [Form Fields](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/form-fields/llms-full.txt): Create fillable forms with ServerTextControl: text, check box, selection and date fields, formats that keep them, filled values, radio buttons and flattening.
- [Headers and Footers](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/headers-footers/llms-full.txt): Add headers, footers and Page x of y numbers in C# with ServerTextControl: first-page and odd or even headers, section headers, restarted numbering and removal.
- [Images](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/images/llms-full.txt): Insert PNG, JPG and SVG images with ServerTextControl from files or byte arrays: inline, anchored or fixed, then scale, find, remove, compress and extract them.
- [Loading Documents](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/loading/llms-full.txt): Load DOCX, RTF, HTML and PDF with ServerTextControl: Load, Append or Selection.Load, LoadSettings, ASP.NET Core uploads, PDF passwords and FilterException.
- [Pages](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/pages/llms-full.txt): Work with the formatted pages of a document in ServerTextControl: count pages, find the page of text and fields, read page text and render pages as SVG or TIFF.
- [Paragraphs](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/paragraphs/llms-full.txt): Format paragraphs with ParagraphFormat in ServerTextControl: alignment, indents, spacing, tab stops and page breaks, ParagraphStyle and numbered lists.
- [Printing](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/printing/llms-full.txt): Print documents from ServerTextControl on Windows with a PrintDocument: printers, page ranges, copies, batch print jobs, MailMerge.Print and FormattingPrinter.
- [Document Protection](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/protection/llms-full.txt): Mark EditableRegion ranges for all or single users with ServerTextControl, read what they entered, remove them and set DocumentPermissions in TextViewGenerator.
- [Saving and Converting Documents](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/saving-converting/llms-full.txt): Convert DOCX, RTF and HTML to PDF with ServerTextControl: batch conversion, Selection.Save, HTML with CSS, smaller PDFs, OmittedContent and ASP.NET Core.
- [Sections](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/sections/llms-full.txt): Divide documents into sections with ServerTextControl: section breaks, SectionFormat, landscape pages, page columns, margins, page borders and loaded sections.
- [Server Visualization](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/server-visualization/llms-full.txt): Render documents, rulers, status bars and dialog boxes as images on the server with TextViewGenerator, View, UserInput and the other ServerVisualization types.
- [Spell Checking and Hyphenation](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/spell-checking/llms-full.txt): Proof documents with ServerTextControl: connect TX Spell .NET, read and correct MisspelledWords, set the language of text and hyphenate with HyphenateWord.
- [Subtext Parts](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/subtext-parts/llms-full.txt): Mark ranges of text with SubTextPart in ServerTextControl: add and nest subtext parts, store data, find them by name or ID, save their content and remove them.
- [Tables of Contents](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/tables-of-contents/llms-full.txt): Generate tables of contents with ServerTextControl: structure levels in paragraph styles, TableOfContents settings, updates after a merge, TOC styles and links.
- [Tables](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/tables/llms-full.txt): Create and fill tables in C# with ServerTextControl: cell formats, rows and merged cells, split tables, formulas with A1 or R1C1 references and number formats.
- [Text Frames and Shapes](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/text-frames-shapes/llms-full.txt): Insert, position and fill text frames with ServerTextControl, read or remove drawings and render shapes as SVG with TXDrawingCore, Shape and ShapeCollection.
- [Text](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/text/llms-full.txt): Select, find, replace and format text in C# with ServerTextControl: input positions, regular expressions, headers and text frames, inline styles and lines.
- [Track Changes](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/track-changes/llms-full.txt): Process tracked changes with ServerTextControl: list changes with author and time, accept or reject them by author or number and finalize DOCX and PDF files.
- [XML Documents](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/xml/llms-full.txt): Load XML files with DTD and CSS into ServerTextControl, read and change elements with GetXmlElements and XmlElement, handle XmlInvalid and save XML and CSS.

---

## Nearby

- **Previous:** [Events](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-viewer/events/llms-full.txt)
- **Next:** [Creating Documents](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-processing/creating/llms-full.txt)
