---
title: "Rendering and font diagnostics"
canonical_url: "https://www.nutrient.io/guides/dws-viewer/troubleshooting/rendering-and-font-diagnostics/"
md_url: "https://www.nutrient.io/guides/dws-viewer/troubleshooting/rendering-and-font-diagnostics.md"
last_updated: "2026-06-08T17:11:05.525Z"
description: "Troubleshoot DWS Viewer rendering and font issues with a diagnostics checklist, direct endpoint links, and a repeatable workflow for collecting support data."
---

# Rendering and font diagnostics

Use this guide when a document renders incorrectly, uses unexpected fallback fonts, or looks different than expected in DWS Viewer API.

The goal is to collect the minimum diagnostics needed to answer four questions:

1. Which fonts does the document reference?

2. Which fonts and substitutions are available globally in DWS Viewer API?

3. Does page rendering reproduce the issue outside the browser viewer?

4. What document metadata and properties should be included in a support escalation?

## Diagnostics checklist

Start with these endpoints:

- **Document fonts** — [`GET /viewer/documents/{documentId}/fonts`](https://www.nutrient.io/api/reference/viewer/public/#tag/Fonts/operation/get-fonts)

- **Global fonts** — [`GET /viewer/fonts`](https://www.nutrient.io/api/reference/viewer/public/#tag/Fonts/operation/get-global-fonts)

- **Global font substitutions** — [`GET /viewer/font_substitutions`](https://www.nutrient.io/api/reference/viewer/public/#tag/Fonts/operation/get-configured-font-substitutions)

- **Page image rendering** — [`GET /viewer/documents/{documentId}/pages/{pageIndex}/image`](https://www.nutrient.io/api/reference/viewer/public/#tag/Documents/operation/render-document-page)

- **Document information** — [`GET /viewer/documents/{documentId}/document_info`](https://www.nutrient.io/api/reference/viewer/public/#tag/Documents/operation/fetch-document-info)

- **Document properties** — [`GET /viewer/documents/{documentId}/properties`](https://www.nutrient.io/api/reference/viewer/public/#tag/Documents/operation/fetch-document-properties)

If the issue is specific to a reviewer layer or another non-default layer, use the corresponding layer endpoints as well:

- [`GET /viewer/documents/{documentId}/layers/{layerName}/fonts`](https://www.nutrient.io/api/reference/viewer/public/#tag/Fonts/operation/get-fonts-in-layer)

- [`GET /viewer/documents/{documentId}/layers/{layerName}/document_info`](https://www.nutrient.io/api/reference/viewer/public/#tag/Documents/operation/fetch-document-layer-info)

- [`GET /viewer/documents/{documentId}/layers/{layerName}/pages/{pageIndex}/image`](https://www.nutrient.io/api/reference/viewer/public/#tag/Documents/operation/render-document-layer-page)

## Recommended investigation flow

Follow this workflow to collect the necessary diagnostics and context for support:

### 1. Check the fonts referenced by the document

Fetch the document fonts first:

```shell

curl -X GET "https://api.nutrient.io/viewer/documents/<document_id>/fonts" \
  -H "Authorization: Bearer <api_key>" \
  --fail

```

This tells you which font faces the document references. Compare this list against the fonts available globally in DWS Viewer API.

### 2. Check global fonts and substitutions

Fetch the globally available fonts:

```shell

curl -X GET https://api.nutrient.io/viewer/fonts \
  -H "Authorization: Bearer <api_key>" \
  --fail

```

Then fetch configured substitutions:

```shell

curl -X GET https://api.nutrient.io/viewer/font_substitutions \
  -H "Authorization: Bearer <api_key>" \
  --fail

```

Use these responses together:

- If a document font is missing from the global font list, fallback behavior is expected.

- If a substitution pattern matches the missing font, DWS Viewer API may render with the configured substitute instead.

- If neither the original font nor an expected substitute appears, collect both responses for support.

### 3. Render a page as an image

Render the affected page directly from the API:

```shell

curl -X GET "https://api.nutrient.io/viewer/documents/<document_id>/pages/0/image?width=1600" \
  -H "Authorization: Bearer <api_key>" \
  -H "Accept: image/png" \
  --fail \
  -o page-0.png

```

This helps confirm whether the issue is already present in server-side rendering, independent of your browser integration.

If annotation appearance streams matter for the investigation, render again with `render_ap_streams=true`.

### 4. Collect document information and properties

Fetch top-level document information:

```shell

curl -X GET "https://api.nutrient.io/viewer/documents/<document_id>/document_info" \
  -H "Authorization: Bearer <api_key>" \
  --fail

```

Fetch document properties:

```shell

curl -X GET "https://api.nutrient.io/viewer/documents/<document_id>/properties" \
  -H "Authorization: Bearer <api_key>" \
  --fail

```

These responses are useful for support because they include page dimensions, permissions, metadata, file size, SHA-256 information, password-protection status, and storage details.

## What to send to support

When escalating a rendering or font issue, include:

- The `document_id`

- The affected `pageIndex`

- The original source file, if you can share it

- The responses from the fonts, substitutions, `document_info`, and `properties` endpoints

- One rendered preview image from the affected page

- Whether the issue happens on the default layer or a specific layer

- Any viewer-side errors or unexpected behavior you observed in Nutrient Web SDK

## Complete Node.js example

For a reusable script that collects all of these diagnostics and saves them to disk, refer to the [Node.js rendering and font diagnostics example](https://www.nutrient.io/guides/dws-viewer/examples/nodejs-rendering-font-diagnostics.md).

## Related guides

- [Upload documents](https://www.nutrient.io/guides/dws-viewer/developer-guides/upload-documents.md)

- [Open a document in Web SDK](https://www.nutrient.io/guides/dws-viewer/developer-guides/open-a-document-in-web.md)

- [Support](https://www.nutrient.io/guides/dws-viewer/support.md)
---

## Related pages

- [Troubleshooting](/guides/dws-viewer/troubleshooting.md)
- [Large document triage](/guides/dws-viewer/troubleshooting/large-document-triage.md)

