> For the complete documentation index, see [llms.txt](https://docs.apryse.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.apryse.com/web/custom-server/custom-server-deployment.md).

# Deploying WebViewer on your custom server

Deploy WebViewer on your custom server for seamless document viewing. Learn how to convert various formats to XOD files and set up Apryse SDK for advanced features. Optimize document rendering across

If you don't want to use [WebViewer Server](/web/webviewer-server/wv-server-deployment.md) as your document backend you can setup your own server to handle document viewing with WebViewer.

## Overview

By converting a wide range of document formats into a web optimized [XPS](https://en.wikipedia.org/wiki/Open_XML_Paper_Specification) file, called XOD, WebViewer is able to deliver consistent results in viewing different document types.

## Instantiation

To instantiate WebViewer with a XOD document simply pass the URL in the initialDoc parameter and do **not** pass the webviewerServerURL option. You do not need to pass a license key to WebViewer because the license key will be used on your server to convert the documents.

{% tabs %}
{% tab title="JavaScript" %}
{% code lineNumbers="true" %}

```js
WebViewer({
  initialDoc: 'YOUR_FILE.xod'
}, viewerElement);
```

{% endcode %}
{% endtab %}
{% endtabs %}

## Using the Apryse SDK for conversion on your server

You can use the Apryse SDK on your Linux, Windows or macOS server to do XOD conversions. Apryse also allows you to use more advanced features: for example apply your own watermark to all converted documents, add/remove pages to converted documents, merge annotations back to the original PDF.

Pre-converted XOD documents render very quickly on all devices. If you're unable to pre-convert your XOD files you can stream the conversion to start sending data to the client as soon as possible.

Apryse is available on [Linux](/web/get-started/samples.md#WebViewer), [Windows](/web/get-started/samples.md#WebViewer) and [macOS](/web/get-started/samples.md#WebViewer). Or read more about all features of the [Apryse Server SDK](https://apryse.com/products/core-sdk/pdf).

## Browser support

| Chrome | Firefox | Safari | Edge | Internet Explorer | Android Chrome | Mobile Safari |
| ------ | ------- | ------ | ---- | ----------------- | -------------- | ------------- |
| ✓      | ✓       | ✓      | ✓    | 9+                | ✓              | ✓             |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.apryse.com/web/custom-server/custom-server-deployment.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
