# Export to PDF On-Premises installation

> **Note**
>
> A valid license key is needed in order to install Export to PDF On-Premises.\
> [Contact us](https://ckeditor.com/contact/) for a trial license key.

<a id="supported-technologies">

## Supported technologies

The application is provided as a docker image by default.

It can be run with any Open Container runtime tool e.g. [Kubernetes](https://kubernetes.io/), [OpenShift](https://www.redhat.com/en/technologies/cloud-computing/openshift), [Podman](https://podman.io/), [Docker](https://docs.docker.com/) and many others.

Refer to the [Requirements guide](requirements.md) for more information about the hardware and software requirements to run the Export to PDF On-Premises.

<a id="setting-up-the-application-using-kubernetes-with-helm-charts">

## Setting up the application using Kubernetes with Helm charts

Use the provided Helm chart to set up the Export to PDF On-Premises.\
More instructions and the Helm chart you will find [in our repository](https://github.com/cksource/ckeditor-cs-on-premises-infrastructure/tree/main/kubernetes/helm/ckeditor-pdf-converter).

<a id="setting-up-the-application-using-a-docker-container">

## Setting up the application using a Docker container

1. Use instructions from the [Customer Portal](https://portal.ckeditor.com/) to log into the Export to PDF On-Premises (PDF converter) Docker registry and pull the Docker image.

2. Containerize the application using `docker` or `docker-compose`.

3. Use a demo page to verify if the application works properly.

<a id="containerize-example-using-docker">

### Containerize example using `docker`

Launch the Docker container:

```bash
docker run --init -p 8080:8080 -e LICENSE_KEY=[your_license_key] docker.cke-cs.com/pdf-converter:[version]
```

If you want to use authorization you should provide `SECRET_KEY`:

```bash
docker run --init -p 8080:8080 -e LICENSE_KEY=[your_license_key] -e SECRET_KEY=[your_secret_key] docker.cke-cs.com/pdf-converter:[version]
```

You can read more about using authorization in the [authorization](authorization.md) section.

<a id="containerize-example-using-docker-compose">

### Containerize example using `docker-compose`

1. Create the `docker-compose.yml` file:

```yaml
version: "3.8"
  services:
	image: docker.cke-cs.com/pdf-converter:[version]
	  ports:
		- "8080:8080"
	  restart: always
	  init: true
	  environment:
		LICENSE_KEY: your_license_key
		# Secret Key is optional
		SECRET_KEY: secret_key
		# Custom request origin is optional
		CUSTOM_REQUEST_ORIGIN: https://your_custom_origin
```

For details on `SECRET_KEY` usage check the [authorization](authorization.md) section.

2. Run:

```bash
docker-compose up
```

<a id="notes">

## Notes

* Without a correct `LICENSE_KEY` the application will not start. If the license is invalid, you’ll get a `Wrong license key` error in the logs and the application will not run.
* You should override the `SECRET_KEY` variable using a unique and hard to guess string for security reasons.
* If your infrastructure has strict CORS enabled, then you can use the `CUSTOM_REQUEST_ORIGIN` variable to set the origin of requests made by the converter. The default value is `https://pdf-internal`.

<a id="windows-fonts-support">

## Windows fonts support

If you want to use Windows fonts like Calibri, Verdana, etc. in your PDF files, you can use the `pdf-converter-windows` Docker image and run it on a Windows operating system.

See [Fonts](fonts.md) section for more details.

<a id="next-steps">

## Next steps

Use the [`http://localhost:8080/v2/convert/html-pdf`](http://localhost:8080/v2/convert/html-pdf) endpoint to export PDF files. Check out the [authorization](authorization.md) section to learn more about tokens and token endpoints.

You can also use the demo page available on [`http://localhost:8080/v2/convert/demo`](http://localhost:8080/v2/convert/demo) to generate an example PDF file.

Refer to the Export to PDF REST API documentation on [`http://localhost:8080/v2/convert/docs`](http://localhost:8080/v2/convert/docs) for more details.

---

Full index of the Cloud Services documentation: [llms.txt](../../../llms.txt)
