---
title: "Watermark still appearing after adding license key | Nutrient Web SDK"
canonical_url: "https://www.nutrient.io/guides/web/troubleshooting/license/watermark-still-appearing/"
md_url: "https://www.nutrient.io/guides/web/troubleshooting/license/watermark-still-appearing.md"
last_updated: "2026-06-10T10:26:37.728Z"
description: "Troubleshoot why watermarks persist in your PDF viewer even after adding a valid license key. Learn common causes and solutions for Nutrient Web SDK."
---

If you’ve added a license key to your Nutrient Web SDK configuration but the watermark still appears, this guide covers specific scenarios that commonly cause this issue.

## Quick troubleshooting checklist

Before diving into specific solutions, verify these common issues first:

1. **Check the console** — Open your browser’s developer console (press F12) and look for license-related error messages.

2. **Verify your domain** — Ensure the domain in your browser matches exactly what’s registered in the [Nutrient Portal](https://my.nutrient.io/users/sign_in).

3. **Review the comprehensive guide** — Many license issues are covered in our [license troubleshooting](https://www.nutrient.io/guides/web/troubleshooting/license-troubleshooting.md) guide.

4. **Check if the watermark is embedded in the document** — Doublecheck that the document doesn’t contain the watermark by opening it directly in the browser or in other viewers, like Adobe.

If you’ve verified the basics above and still see a watermark, continue with the solutions below.

## Scenario 1: Environment variable issues

When using environment variables to store your license key, deployment platforms may cause issues that result in an empty or undefined license key.

### Issue 1: License key trimmed during deployment

Some deployment platforms (Vercel, Netlify, AWS) may trim whitespace or line breaks from environment variables. Verify your license key wasn’t truncated:

```javascript

// Debug: Check if license key is complete.
const licenseKey = process.env.NUTRIENT_LICENSE_KEY;
console.log("License key length:", licenseKey?.length);
console.log("License key (first 50 chars):", licenseKey?.substring(0, 50));

if (!licenseKey || licenseKey.length < 100) {
  console.error("License key appears to be missing or incomplete!");
}

```

**Common deployment issue**: Always verify the full license key is present in your deployment platform’s environment variable settings. Some platforms have character limits or may trim values when pasting.

### Issue 2: Next.js on Vercel requires the NEXT_PUBLIC_ prefix

If you’re using Next.js and deploying to Vercel (or similar platforms), environment variables must be prefixed with `NEXT_PUBLIC_` to be accessible in the browser:

```javascript

// ❌ INCORRECT: This won't work in Next.js browser code.
NutrientViewer.load({
  container: "#pspdfkit",

  document: "document.pdf",
  licenseKey: process.env.NUTRIENT_LICENSE_KEY, // Returns undefined in browser.
});

// ✅ CORRECT: Use the `NEXT_PUBLIC_` prefix for Next.js.
NutrientViewer.load({
  container: "#pspdfkit",

  document: "document.pdf",
  licenseKey: process.env.NEXT_PUBLIC_NUTRIENT_LICENSE_KEY,
});

```

**Your `.env` file should look like the following:**

```bash

# ❌ INCORRECT: Missing `NEXT_PUBLIC_` prefix.

NUTRIENT_LICENSE_KEY=nX5NbnzGFzYhuWTje1LqC8hWYX...

# ✅ CORRECT: With `NEXT_PUBLIC_` prefix.

NEXT_PUBLIC_NUTRIENT_LICENSE_KEY=nX5NbnzGFzYhuWTje1LqC8hWYX...

```

**Next.js deployment note**: Environment variables without the `NEXT_PUBLIC_` prefix aren’t available in the browser, causing the license key to be `undefined` and triggering trial mode. Learn more in the [Next.js environment variables documentation](https://nextjs.org/docs/pages/building-your-application/configuring/environment-variables#environment-variables-on-vercel).

### Issue 3: Conditional logic returning empty string

Check if your code has conditional logic that might return an empty string:

```javascript

// ❌ INCORRECT: Falls back to empty string (trial mode).
NutrientViewer.load({
  container: "#pspdfkit",

  document: "document.pdf",
  licenseKey: process.env.NEXT_PUBLIC_NUTRIENT_LICENSE_KEY || "", // Empty string = trial mode
});

// ✅ CORRECT: Throw error if license key is missing.
const licenseKey = process.env.NEXT_PUBLIC_NUTRIENT_LICENSE_KEY;

if (!licenseKey) {
  throw new Error(
    "License key is not configured. Please set NEXT_PUBLIC_NUTRIENT_LICENSE_KEY environment variable.",
  );
}

NutrientViewer.load({
  container: "#pspdfkit",

  document: "document.pdf",
  licenseKey: licenseKey,
});

// Also applies to other methods that accept configuration:
NutrientViewer.convertToPDF({
  document: "document.docx",
  licenseKey: licenseKey, // Don't forget this!
});

NutrientViewer.loadTextComparison({
  container: "#comparison-container",

  documentA: "original.pdf",
  documentB: "modified.pdf",
  licenseKey: licenseKey, // Required here too!
});

```

Remember: All Nutrient methods that accept a configuration object require the `licenseKey` property. See the [API documentation](https://www.nutrient.io/api/web/interfaces/Configuration.html) for complete details.

## Scenario 2: Missing license features for specific functionality

Having a valid `licenseKey` isn’t enough on its own; your license must also include the appropriate features for the functionality you’re using. The SDK will display a watermark, even with a valid license key, if your license doesn’t include the required features.

**Methods and file types that require specific license features:**

- **Office Files feature** — Required for:
  - Loading Office documents (DOCX, DOC, XLSX, XLS, PPTX, PPT) with [`NutrientViewer.load()`](https://www.nutrient.io/api/web/functions/NutrientViewer.load.html)
  - Converting documents with [`NutrientViewer.convertToPDF()`](https://www.nutrient.io/api/web/functions/NutrientViewer.convertToPDF.html) and [`NutrientViewer.convertToOffice()`](https://www.nutrient.io/api/web/functions/NutrientViewer.convertToOffice.html)

- **Image Documents feature** — Required for loading image files (PNG, JPG, JPEG, TIFF, etc.) with [`NutrientViewer.load()`](https://www.nutrient.io/api/web/functions/NutrientViewer.load.html)

- **Text Comparison feature** — Required for using [`NutrientViewer.loadTextComparison()`](https://www.nutrient.io/api/web/functions/NutrientViewer.loadTextComparison.html)

- **Document Generation feature** — Required for using [`NutrientViewer.populateDocumentTemplate()`](https://www.nutrient.io/api/web/functions/NutrientViewer.populateDocumentTemplate.html)

**To resolve this issue:**

1. **Check the browser console** for error messages that look like: _"The API you’re trying to use requires a license that includes the 'X' feature"_ (where X is the specific feature name).

2. **Verify your license features** in the [Nutrient Portal](https://my.nutrient.io/users/sign_in):
   - Log in and navigate to your **Manage Licenses** page.
   - Locate the license for the generated license key.
   - Check the **Features** list to see which features are enabled in your license.

3. **If the required feature is missing** — Contact our [Sales team](https://www.nutrient.io/contact-sales) to add Office Files, Image Documents, or other features to your existing license.

4. **If the required feature is already enabled** — Copy the license key again from the portal for your domain/bundle ID. Your current license key might have been generated before the feature was added to your license, so you need a fresh key that includes the new feature.

## Scenario 3: Clear browser cache

Browser caching can sometimes cause the old (unlicensed) version of your application to load.

**Hard refresh methods by browser:**

- **Chrome/Edge** — Press Control-Shift-R (Windows/Linux) or Command-Shift-R (Mac)

- **Firefox** — Press Control-F5 (Windows/Linux) or Command-Shift-R (Mac)

- **Safari** — Press Command-Option-R (Mac)

**Alternative**: Open your application in an incognito/private browsing window to bypass the cache entirely.

## Additional common issues

For other license-related issues, refer to our comprehensive [license troubleshooting](https://www.nutrient.io/guides/web/troubleshooting/license-troubleshooting.md) guide, which covers:

- Domain mismatch and subdomain configuration

- License key expiration and renewal

- Standalone vs. Document Engine licensing

- Beta license key requests for localhost, development, QA and staging environments

- License validation errors and their meanings

- Copy/paste issues with license keys

## Still having issues?

If you’ve tried all the solutions above and the watermark still appears:

1. Review the comprehensive [license troubleshooting](https://www.nutrient.io/guides/web/troubleshooting/license-troubleshooting.md) guide for additional scenarios.

2. Check the browser console for specific error messages.

3. Contact our [Support team](https://support.nutrient.io/hc/en-us/requests/new) with the following information:
   - The license key for your registered domain
   - The SDK version you’re using
   - Any error messages from the browser console
   - Screenshots of the issue

## Additional resources

- [Adding the license key](https://www.nutrient.io/guides/web/troubleshooting/license/add-license-key.md) — Learn how to add your license key correctly

- [Nutrient Portal](https://my.nutrient.io/users/sign_in) — Manage your licenses and request beta keys

- [Features list](https://www.nutrient.io/sdk/features-list/) — See all available SDK features and license options

- [Getting started with Web SDK](https://www.nutrient.io/sdk/web/getting-started.md) — Initial setup and configuration
---

## Related pages

- [How to add your license key for Nutrient Web SDK](/guides/web/troubleshooting/license/add-license-key.md)
- [License troubleshooting for Nutrient Web SDK](/guides/web/troubleshooting/license-troubleshooting.md)

