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:
- Which fonts does the document reference?
- Which fonts and substitutions are available globally in DWS Viewer API?
- Does page rendering reproduce the issue outside the browser viewer?
- 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 - Global fonts —
GET /viewer/fonts - Global font substitutions —
GET /viewer/font_substitutions - Page image rendering —
GET /viewer/documents/{documentId}/pages/{pageIndex}/image - Document information —
GET /viewer/documents/{documentId}/document_info - Document properties —
GET /viewer/documents/{documentId}/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}/fontsGET /viewer/documents/{documentId}/layers/{layerName}/document_infoGET /viewer/documents/{documentId}/layers/{layerName}/pages/{pageIndex}/image
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:
curl -X GET "https://api.nutrient.io/viewer/documents/<document_id>/fonts" \ -H "Authorization: Bearer <api_key>" \ --failThis 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:
curl -X GET https://api.nutrient.io/viewer/fonts \ -H "Authorization: Bearer <api_key>" \ --failThen fetch configured substitutions:
curl -X GET https://api.nutrient.io/viewer/font_substitutions \ -H "Authorization: Bearer <api_key>" \ --failUse 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:
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.pngThis 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:
curl -X GET "https://api.nutrient.io/viewer/documents/<document_id>/document_info" \ -H "Authorization: Bearer <api_key>" \ --failFetch document properties:
curl -X GET "https://api.nutrient.io/viewer/documents/<document_id>/properties" \ -H "Authorization: Bearer <api_key>" \ --failThese 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, andpropertiesendpoints - 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.