Supported File Formats
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 | RTF, DOC, DOCX, HTML, PDF, TX | A document in the returnFormat |
| document/merge | 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 | A template in RTF, DOC, DOCX or TX | A document in the returnFormat |
| document/append | Documents as Base64 strings | One document in the returnFormat |
| document/thumbnails | DOC, DOCX, PDF, TX, XLSX, RTF, HTML | Page images in the imageFormat: PNG, JPG, GIF, BMP or SVG |
| document/info | A document as a Base64 string | JSON with the document properties, merge fields and merge blocks |
| pdf/create | A document as a Base64 string | PDF or PDF/A, with optional signature, attachments and permissions |
| pdf/embeddedfiles, pdf/metadata, pdf/acroforms/fields | JSON with the attachments, the metadata or the form fields | |
| barcodes/create | 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
barcodeTypeparameter, for exampleQRCode,Code128orDatamatrix.
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 explains the two builds.
PDF and PDF/A
- PDF/A.
PDFAcreates PDF/A-3b, the conformance level thePDFFormatenumeration of the .NET package names. - Creating PDF with options. pdf/create 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
flattenFormFieldsparameter 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 and the Document Viewer JavaScript API.