# Document Processing

> Convert HTML to PDF with DS Server from .NET with the DocumentProcessing NuGet package or from any language with plain HTTP requests, and compare both ways.

- **Product:** DS Server
- **Section:** Documentation
- **Kind:** Topic
- **Path:** DS Server > Getting Started > Document Processing
- **520 words**
- **Web URL:** https://docs.textcontrol.com/ds-server/getting-started/document-processing/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/getting-started/document-processing/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/getting-started/document-processing/llms-full.txt

---

DocumentProcessing is the Web API of DS Server that works on documents without a user interface: it converts them between formats, merges templates with JSON data, combines documents, renders page thumbnails and creates PDFs. The two tutorials below build the same first application, a conversion from HTML to PDF, in two ways, so you can start with the one that fits your stack.

### Two Ways to Call DocumentProcessing

|  | ASP.NET Core | Web API |
|---|---|---|
| What you use | The NuGet package `TXTextControl.DocumentServices.DocumentProcessing` | Plain HTTP requests, shown with curl and JavaScript |
| Languages | C#, in any .NET 8 or .NET 10 application | Any language with an HTTP client |
| Access token | The package requests it and sends it with every request | You request it at `/oauth/token` and send it yourself |
| Documents | Byte arrays in and out | Base64-encoded strings in JSON |
| Tutorial | [ASP.NET Core](https://docs.textcontrol.com/ds-server/getting-started/document-processing/aspnet-core/llms-full.txt) | [Web API](https://docs.textcontrol.com/ds-server/getting-started/document-processing/web-api/llms-full.txt) |

Both send the same requests to the same endpoints: the .NET package is a wrapper around the Web API. Everything the package does, you can do with HTTP requests, so the choice depends only on the language of your application.

### What Both Tutorials Need

- **A DS Server** of your own, installed and registered, or a [Trial Token](https://docs.textcontrol.com/ds-server/getting-started/trial-token/llms-full.txt) for the trial server that Text Control hosts. An unregistered server answers every DocumentProcessing request with `DS Server is not registered.`
- **A security profile** with its client ID and client secret, which allows the client credentials grant type. [ASP.NET Core](https://docs.textcontrol.com/ds-server/getting-started/document-processing/aspnet-core/#create-a-security-profile) shows how to create it in the admin portal. The trial token comes with such a profile.

### Pages in This Section

- [ASP.NET Core](https://docs.textcontrol.com/ds-server/getting-started/document-processing/aspnet-core/llms-full.txt): create an ASP.NET Core MVC application, install the NuGet package and return a PDF that DS Server converted from HTML.
- [Web API](https://docs.textcontrol.com/ds-server/getting-started/document-processing/web-api/llms-full.txt): request an access token and convert HTML to PDF with curl, then with JavaScript in Node.js.

The task pages of [Document Processing](https://docs.textcontrol.com/ds-server/document-processing/llms-full.txt) go further, with one page each for converting, merging, appending, thumbnails, PDF documents and barcodes. The [Web API](https://docs.textcontrol.com/ds-server/reference/web-api/llms-full.txt) reference describes every endpoint.

---

## In This Section

- [ASP.NET Core](https://docs.textcontrol.com/ds-server/getting-started/document-processing/aspnet-core/llms-full.txt): Convert HTML and DOCX to PDF in an ASP.NET Core MVC app with the DocumentProcessing NuGet package: create a security profile, configure OAuth and call Convert.
- [Web API](https://docs.textcontrol.com/ds-server/getting-started/document-processing/web-api/llms-full.txt): Request an OAuth access token and convert HTML to PDF with two curl commands, then send the same requests from Node.js with fetch and Base64-encoded JSON.

---

## Nearby

- **Previous:** [Trial Token](https://docs.textcontrol.com/ds-server/getting-started/trial-token/llms-full.txt)
- **Next:** [ASP.NET Core](https://docs.textcontrol.com/ds-server/getting-started/document-processing/aspnet-core/llms-full.txt)
