---
title: "Configure Instant JSON appearance and tracking | Nutrient .NET SDK"
canonical_url: "https://www.nutrient.io/guides/dotnet/annotations/configure-instant-json-appearance-and-tracking/"
md_url: "https://www.nutrient.io/guides/dotnet/annotations/configure-instant-json-appearance-and-tracking.md"
last_updated: "2026-06-26T00:00:00.000Z"
description: "Configure Instant JSON rendering themes and change tracking behavior in Nutrient .NET SDK."
---

# Configure Instant JSON appearance and tracking

Instant JSON import and export in Nutrient.NET SDK uses two SDK-wide settings on `InstantJsonSettings`: [`RenderTheme`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14.API~Nutrient.NativeSDK.API.Settings.InstantJsonSettings~RenderTheme.html) controls how annotation appearances are drawn, and [`ChangeTrackingEnabled`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14.API~Nutrient.NativeSDK.API.Settings.InstantJsonSettings~ChangeTrackingEnabled.html) controls whether exports return a diff or a full snapshot.

The Core appearance theme matches the rendering produced by [Nutrient Web SDK](https://www.nutrient.io/guides/web.md) and [Nutrient Document Engine](https://www.nutrient.io/guides/document-engine.md), so PDFs that pass through the.NET SDK look the same as PDFs touched by any other Nutrient SDK. The legacy GdPicture theme keeps the rendering used by earlier Nutrient.NET SDK releases.

Change tracking records every annotation, form field, comment, and bookmark added, modified, or removed after the document loads. With it enabled — the default — [`ExportInstantJSONDataToFile`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14.API~GdPicture14.GdPicturePDF~ExportInstantJSONDataToFile.html) returns only what changed. Disable it when every export must contain the complete document state, or pass `fullState: true` to force a single export to emit a full snapshot regardless of the tracking flag.

This sample shows how to configure both settings, import an Instant JSON file with the Core theme, and export both diff and full-state Instant JSON files from the result.

## Prepare the project

Start by registering the SDK license before you process documents. For setup details, refer to the [getting started with.NET SDK](https://www.nutrient.io/sdk/dotnet/getting-started.md) guide.

```csharp

using GdPicture14;
using Nutrient.NativeSDK.API.Settings;

LicenseManager licence = new LicenseManager();
licence.RegisterKEY(""); // Set your license key

```

## Configure the appearance theme

Set [`RenderTheme`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14.API~Nutrient.NativeSDK.API.Settings.InstantJsonSettings~RenderTheme.html) at process startup. Every Instant JSON import that follows uses the configured renderer to generate annotation appearance streams:

```csharp

InstantJsonSettings instantJson = SdkSettings.Get<InstantJsonSettings>();
instantJson.RenderTheme = InstantJsonRenderTheme.Core;

```

Switch to `InstantJsonRenderTheme.Default` to keep the legacy GdPicture appearance. The setting only affects new appearance streams generated during import — it doesn't rewrite appearances already in the source PDF.

## Enable change tracking

[`ChangeTrackingEnabled`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14.API~Nutrient.NativeSDK.API.Settings.InstantJsonSettings~ChangeTrackingEnabled.html) defaults to `true`, but you may want to set it explicitly when you need every export to be a diff. With tracking on, the SDK sends each change to the change tracker whenever you call [`AddSquareAnnotation`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14.API~GdPicture14.GdPicturePDF~AddSquareAnnotation.html), [`AddStickyNoteAnnotation`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14.API~GdPicture14.GdPicturePDF~AddStickyNoteAnnotation.html), [`RemoveAnnotation`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14.API~GdPicture14.GdPicturePDF~RemoveAnnotation.html), or any other mutating API:

```csharp

instantJson.ChangeTrackingEnabled = true;

```

## Import the Instant JSON file

Load a PDF with [`LoadFromFile`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14.API~GdPicture14.GdPicturePDF~LoadFromFile.html), then apply the Instant JSON file with [`ImportInstantJSONDataFromFile`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14.API~GdPicture14.GdPicturePDF~ImportInstantJSONDataFromFile.html). The import uses the Core theme because of the SDK-wide setting above:

```csharp

using GdPicturePDF pdf = new GdPicturePDF();
GdPictureStatus loadStatus = pdf.LoadFromFile(@"test_form_fields.pdf");
if (loadStatus!= GdPictureStatus.OK)
{
    Console.Error.WriteLine($"Loading PDF failed: {loadStatus}");
    Environment.Exit(1);
}

GdPictureStatus importStatus = pdf.ImportInstantJSONDataFromFile(@"test_annotations_instant.json");
if (importStatus!= GdPictureStatus.OK)
{
    Console.Error.WriteLine($"Instant JSON import failed: {importStatus}");
    Environment.Exit(1);
}

```

## Add a couple of post-import changes

Make a few document changes so the diff export has something to capture:

```csharp

pdf.AddSquareAnnotation(72, 144, 200, 60, "Reviewer", "Highlighted region", 2.0f,
    PdfAnnotationBorderStyle.PdfAnnotationBorderStyleSolid, 0, 0, 1.0f, 255, 0, 0);
pdf.AddStickyNoteAnnotation(PdfStickyNoteAnnotationIcon.PdfAnnotationIconComment,
    72, 220, "Reviewer", "Section question", "Please confirm this section.",
    1.0f, false, 255, 255, 0, 0, 0, 0, 0);

```

## Export the diff

[`ExportInstantJSONDataToFile`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14.API~GdPicture14.GdPicturePDF~ExportInstantJSONDataToFile.html) produces a diff that includes only the two annotations added above, plus any other changes the tracker recorded. The annotations imported earlier aren't repeated:

```csharp

GdPictureStatus diffStatus = pdf.ExportInstantJSONDataToFile(@"diff.json");
if (diffStatus!= GdPictureStatus.OK)
{
    Console.Error.WriteLine($"Diff Instant JSON export failed: {diffStatus}");
    Environment.Exit(1);
}

```

## Export the full snapshot

Use `fullState: true` on the stream overload to emit a complete snapshot of the document, regardless of the change tracker. Use [`ExportInstantJSONDataToStream`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14.API~GdPicture14.GdPicturePDF~ExportInstantJSONDataToStream.html) for archival, document hand-off, or first-time syncs:

```csharp

using FileStream fullStream = new FileStream(@"full.json", FileMode.Create, FileAccess.Write);
GdPictureStatus fullStatus = pdf.ExportInstantJSONDataToStream(fullStream, fullState: true);
if (fullStatus!= GdPictureStatus.OK)
{
    Console.Error.WriteLine($"Full Instant JSON export failed: {fullStatus}");
    Environment.Exit(1);
}

```

Both shapes use the same Instant JSON schema, so [`ImportInstantJSONDataFromFile`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14.API~GdPicture14.GdPicturePDF~ImportInstantJSONDataFromFile.html) accepts either.

## Diff versus full state — when to use which

Choose the export that matches the workflow. The two options serve different scenarios:

- **Diff export** (default, change tracking on) — Use this for incremental updates. A server can hold the source PDF, while the client edits annotations and sends back only what changed. The payload stays smaller, and the data is simpler to merge.

- **Full export** (`fullState: true` or change tracking off) — Use this for archival, document hand-off, or first-time syncs when the receiver doesn't yet have the original PDF. The payload is larger, but it contains the full document state.

To disable change tracking globally so every export becomes a full snapshot, use [`SdkSettings.Get<InstantJsonSettings>()`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14.API~Nutrient.NativeSDK.API.Settings.SdkSettings~Get.html) to set [`ChangeTrackingEnabled`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14.API~Nutrient.NativeSDK.API.Settings.InstantJsonSettings~ChangeTrackingEnabled.html) to `false`:

```csharp

SdkSettings.Get<InstantJsonSettings>().ChangeTrackingEnabled = false;

```

## Error handling

Both settings are part of the Native SDK settings system, so they don't throw — invalid enum values simply fail to compile. The Instant JSON APIs return `GdPictureStatus` for runtime errors:

- `GdPictureStatus.PdfDocumentMustBeUnencrypted` — Instant JSON refuses to operate on encrypted PDFs

- `GdPictureStatus.FileNotFound` — the path supplied to an import call doesn't exist

- `GdPictureStatus.GenericError` — malformed Instant JSON, or no PDF is loaded

For status-handling patterns, refer to the [handling errors with.NET SDK](https://www.nutrient.io/guides/dotnet/best-practices.md#error-handling) guide. For a comprehensive walkthrough of the settings system, refer to the [configure.NET SDK settings](https://www.nutrient.io/guides/dotnet/about/configure-native-sdk-settings.md) sample. For visual examples of theme differences, refer to the [Instant JSON appearance theme comparison](https://www.nutrient.io/guides/dotnet/annotations/instant-json-appearance-theme-comparison.md) guide.

## Conclusion

This sample configures the two Instant JSON settings that matter for import and export, imports a JSON file with the Core appearance theme, and produces both diff and full-state exports from the result. The same settings work across every Instant JSON import and export in the SDK, so configuring them once at startup is usually enough.
---

## Related pages

- [Attach a file to an annotation in C#](/guides/dotnet/annotations/attach-a-file.md)
- [Annotate on images in C# .NET](/guides/dotnet/annotations/annotate-on-images.md)
- [Attach an image to an annotation in C#](/guides/dotnet/annotations/attach-an-image.md)
- [Convert between Instant JSON and XFDF](/guides/dotnet/annotations/convert-between-instant-json-and-xfdf.md)
- [Convert between Instant JSON and XMP](/guides/dotnet/annotations/convert-between-instant-json-and-xmp.md)
- [Create an annotation in a PDF using C#](/guides/dotnet/annotations/create.md)
- [Custom annotations](/guides/dotnet/annotations/custom-annotations.md)
- [Edit PDF annotations in C#](/guides/dotnet/annotations/edit.md)
- [Export Instant JSON from a PDF](/guides/dotnet/annotations/export-instant-json-from-pdf.md)
- [Export annotation data from PDFs in C# .NET](/guides/dotnet/annotations/export-pdf.md)
- [Get PDF annotation properties in C# .NET](/guides/dotnet/annotations/get-properties.md)
- [Export XMP annotation data in C# .NET](/guides/dotnet/annotations/export-xmp.md)
- [Import Instant JSON into a PDF](/guides/dotnet/annotations/import-instant-json-into-pdf.md)
- [Flatten PDF annotations in C# .NET](/guides/dotnet/annotations/flatten.md)
- [Import XFDF annotation data to PDFs in C# .NET](/guides/dotnet/annotations/import-xfdf.md)
- [Import XMP annotation data to PDF or image in C#](/guides/dotnet/annotations/import-xmp.md)
- [Instant JSON appearance theme comparison](/guides/dotnet/annotations/instant-json-appearance-theme-comparison.md)
- [PDF annotations in C#.NET](/guides/dotnet/annotations.md)
- [Remove PDF annotations in C# .NET](/guides/dotnet/annotations/remove.md)
- [Add PDF actions using C# in form fields](/guides/dotnet/annotations/pdf-actions-support.md)
- [Stamp a PDF document in C# .NET](/guides/dotnet/annotations/stamp-a-document.md)
- [XMP annotations in C# .NET](/guides/dotnet/annotations/xmp-annotations.md)

