# Supported File Formats

> The formats each DocumentProcessing endpoint accepts and returns: returnFormat values DOCX, PDF, PDF/A, RTF, HTML, image formats and the limits on Linux.

- **Product:** DS Server
- **Section:** Documentation
- **Kind:** Topic
- **Path:** DS Server > Overview > Supported File Formats
- **1384 words**
- **Web URL:** https://docs.textcontrol.com/ds-server/overview/file-formats/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/overview/file-formats/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/overview/file-formats/llms-full.txt

---

Most endpoints of the DocumentProcessing Web API take a document as a Base64 string and return a document, page images or JSON, so the formats they accept and the formats they can return decide what your application can do with them. The tables below list them per endpoint, with the values of the `returnFormat` and `imageFormat` parameters, and the limits that apply when DS Server runs on Linux.

### Document Formats

The endpoints that return a document take the format in the `returnFormat` query parameter. The default is `PDF`.

| `returnFormat` | Format | Returned by |
|---|---|---|
| `PDF` | Adobe PDF | convert, merge, findandreplace, append, pdf/create |
| `PDFA` | PDF/A, created as PDF/A-3b | convert, merge, findandreplace, append, pdf/create |
| `DOCX` | Microsoft Word, Office Open XML | convert, merge, findandreplace, append |
| `DOC` | Microsoft Word 97-2003 | convert, merge, findandreplace, append |
| `RTF` | Rich Text Format | convert, merge, findandreplace, append |
| `HTML` | HTML | convert, merge, findandreplace, append |
| `TX` | TX Text Control format, Unicode | convert, merge, findandreplace, append |
| `TXT` | Plain Unicode text | convert, merge, findandreplace, append |

The `ReturnFormat` enumeration of the .NET package `TXTextControl.DocumentServices.DocumentProcessing` has the same values.

### Formats per Endpoint

| Endpoint | Accepts | Returns |
|---|---|---|
| [document/convert](https://docs.textcontrol.com/ds-server/reference/web-api/documentprocessing/document-convert/post/llms-full.txt) | RTF, DOC, DOCX, HTML, PDF, TX | A document in the `returnFormat` |
| [document/merge](https://docs.textcontrol.com/ds-server/reference/web-api/documentprocessing/document-merge/post/llms-full.txt) | A template in RTF, DOC, DOCX or TX, and JSON data | An array of documents in the `returnFormat`, one document unless `append` is `false` |
| [document/findandreplace](https://docs.textcontrol.com/ds-server/reference/web-api/documentprocessing/document-findandreplace/post/llms-full.txt) | A template in RTF, DOC, DOCX or TX | A document in the `returnFormat` |
| [document/append](https://docs.textcontrol.com/ds-server/reference/web-api/documentprocessing/document-append/post/llms-full.txt) | Documents as Base64 strings | One document in the `returnFormat` |
| [document/thumbnails](https://docs.textcontrol.com/ds-server/reference/web-api/documentprocessing/document-thumbnails/post/llms-full.txt) | DOC, DOCX, PDF, TX, XLSX, RTF, HTML | Page images in the `imageFormat`: PNG, JPG, GIF, BMP or SVG |
| [document/info](https://docs.textcontrol.com/ds-server/reference/web-api/documentprocessing/document-info/post/llms-full.txt) | A document as a Base64 string | JSON with the document properties, merge fields and merge blocks |
| [pdf/create](https://docs.textcontrol.com/ds-server/reference/web-api/documentprocessing/pdf-create/post/llms-full.txt) | A document as a Base64 string | PDF or PDF/A, with optional signature, attachments and permissions |
| [pdf/embeddedfiles](https://docs.textcontrol.com/ds-server/reference/web-api/documentprocessing/pdf-embeddedfiles/post/llms-full.txt), [pdf/metadata](https://docs.textcontrol.com/ds-server/reference/web-api/documentprocessing/pdf-metadata/post/llms-full.txt), [pdf/acroforms/fields](https://docs.textcontrol.com/ds-server/reference/web-api/documentprocessing/pdf-acroforms-fields/post/llms-full.txt) | PDF | JSON with the attachments, the metadata or the form fields |
| [barcodes/create](https://docs.textcontrol.com/ds-server/reference/web-api/documentprocessing/barcodes-create/post/llms-full.txt) | The barcode text and settings | A barcode image in the `imageFormat`: BMP, EMF, GIF, JPEG, PNG or TIFF |

What the table does not show:

- **Templates** for merge and findandreplace are the word processing formats RTF, DOC, DOCX and TX. HTML and PDF are accepted by convert, but not as templates.
- **XLSX** is accepted by the thumbnails endpoint. The reference of the convert endpoint does not list it as an input format.
- **Thumbnails** default to PNG. SVG was added in version 3.2.0. On Linux, the changelog limits the rendering of documents to SVG.
- **Barcodes** default to PNG. The barcode type is set with the `barcodeType` parameter, for example `QRCode`, `Code128` or `Datamatrix`.

### Limits on Linux

When DS Server runs on Linux, the changelog of version 4.0 limits the formats:

|  | Supported on Linux |
|---|---|
| Document formats | DOCX, HTML, PDF and XLSX |
| Image formats, open and save | PNG, JPG and BMP |
| Image formats, open only | TIFF and GIF |
| Rendering | SVG only, no bitmap rendering |

On Linux, the `returnFormat` values `DOC`, `RTF`, `TX` and `TXT`, and templates in the formats DOC, RTF and TX, are therefore outside the documented support. Use the Classic build on Windows for them. [Core and Classic](https://docs.textcontrol.com/ds-server/overview/core-classic/llms-full.txt) explains the two builds.

### PDF and PDF/A

- **PDF/A.** `PDFA` creates PDF/A-3b, the conformance level the `PDFFormat` enumeration of the .NET package names.
- **Creating PDF with options.** [pdf/create](https://docs.textcontrol.com/ds-server/reference/web-api/documentprocessing/pdf-create/post/llms-full.txt) adds a digital signature with an X.509 certificate, embedded files, document access permissions, passwords, keywords and JavaScript actions to the PDF.
- **Reading PDF.** Three endpoints read a PDF without converting it: its embedded files, its metadata and its AcroForm fields.
- **Form fields.** The convert endpoint's `flattenFormFields` parameter replaces the form fields of a document by their values.

### Document Editor and Document Viewer

The Document Editor and the Document Viewer load and save documents through their own JavaScript APIs and client packages rather than through the Web API. Their documents are processed by the same DS Server installation, so the limits on Linux apply to them as well. See the [Document Editor JavaScript API](https://docs.textcontrol.com/ds-server/reference/javascript/llms-full.txt) and the [Document Viewer JavaScript API](https://docs.textcontrol.com/ds-server/reference/javascript-document-viewer/txdocumentviewer/llms-full.txt).

### Related Pages

- [Converting Documents](https://docs.textcontrol.com/ds-server/document-processing/converting/llms-full.txt): convert documents with the Web API.
- [PDF Documents](https://docs.textcontrol.com/ds-server/document-processing/pdf/llms-full.txt): create PDF and PDF/A documents.
- [Thumbnails](https://docs.textcontrol.com/ds-server/document-processing/thumbnails/llms-full.txt): render page images.
- [Core and Classic](https://docs.textcontrol.com/ds-server/overview/core-classic/llms-full.txt): the two builds and where each one runs.
- [DocumentProcessing](https://docs.textcontrol.com/ds-server/reference/web-api/documentprocessing/llms-full.txt): every endpoint of the Web API.

---

## Nearby

- **Previous:** [Core and Classic](https://docs.textcontrol.com/ds-server/overview/core-classic/llms-full.txt)
- **Next:** [Licensing Overview](https://docs.textcontrol.com/ds-server/overview/licensing/llms-full.txt)
