Skip to Content
NexPDF

Running without a license key

What NexPDF for .NET MAUI does before a key is activated, how the watermark works in PdfView, and how to evaluate every module with a trial key.

English

You do not need a key to install NexPDF, build your app or run it. Until a license is activated (NexPdfEngine.Activate returns true, or NexPdfSdk.ActivateLicense returns), the SDK runs in view-only mode:

  • the viewer module works: PdfView opens, scrolls and zooms documents, and the engine renders, extracts text, searches and reads document information;
  • every page PdfView shows, and every page rendered with RenderPagePng, carries a "NexPDF • Unlicensed" watermark;
  • every call that needs another module throws NexPdfException.
using Nexdevit.NexPdf;
using Nexdevit.NexPdf.Maui;

await view.LoadAsync(pdfBytes);                         // works, pages are watermarked
var text = view.Document!.ExtractPageText(0);           // works

try
{
    view.Document.RotatePage(0, 90);                    // needs the editor module
}
catch (NexPdfException e)
{
    System.Diagnostics.Debug.WriteLine(e.Message);  // no license activated: 'editor' requires a NexPDF license key
}

What works without a key

AreaMembers
ViewerPdfView: LoadAsync, DocumentBytes, Password, ReloadAsync, GoToPageAsync, SetZoom, pinch and double-tap zoom
Opening and savingNexPdfDocument.Open, OpenBytes, OpenBytesWithPassword, OpenImage, Save, SaveBytes, SaveLinearized, Copy, InsertImagePages
RenderingRenderPagePng, RenderThumbPng, PageCount, PageWidth, PageHeight, PageViewJson, PageView, SetOverprint (RenderPagePng output is watermarked)
TextExtractPageText, ExtractMarkdown, ToMarkdown, PageBlocksJson, SearchJson, AskDocument, AskDocumentJson
Reading structureMetadataJson, OutlinesJson, PageLabelsJson, LayersJson, SetLayerVisible, AttachmentsJson, AttachmentData
Reading annotationsAnnotationsJson, MeasurementsJson
SecuritySecurityJson
Comparing and memoryCompareJson, CompareOverlayPng, CompareTextJson, CompareAnnotate, TrimMemory, MemoryUsageBytes

Everything else (annotating, filling forms, editing, encrypting, redacting, signing, converting, OCR and PDF/A) needs a key that includes the module. The API reference names the module of every method.

Check the mode at run time

using System.Text.Json.Nodes;

var status = JsonNode.Parse(NexPdfSdk.LicenseStatusJson())!;
var state = status["state"]!.GetValue<string>();     // "unlicensed", "trial" or "licensed"
WatermarkNotice.IsVisible = state != "licensed";

Use NexPdfSdk.IsLicensed("annotations") to hide buttons for features your key does not unlock instead of waiting for the exception.

Evaluate with a trial key

A trial key unlocks every module so you can try annotations, signing, redaction and the rest. It keeps a "NexPDF • Trial" watermark on rendered pages, and NexPdfSdk.ActivateLicense returns 1 instead of 2. Trial keys last 30 days; ask for one from the pricing page and activate it exactly like a commercial key; see License.

Do not ship view-only or trial builds

The watermark is drawn on the pixels of rendered pages only; documents you save are not changed. Even so, view-only and trial modes are for development and evaluation. Production apps need a commercial key for the modules they use. See Licensing and the modules per plan.

On this page