Skip to main content Skip to footer

What's New in Document Solutions v9

We’re excited to announce the release of Document Solutions v9.0, delivering powerful new capabilities across the entire product line. This release introduces major advancements such as AI-powered spreadsheet functions in Document Solutions for Excel (DsExcel), extensive performance improvements for large-scale workbook operations, expanded document field support in Document Solutions for Word (DsWord), optimized PDF workflows in Document Solutions for PDF (DsPdf), and new usability enhancements in Document Solutions Image Viewer (DsImageViewer), including image skew transforms and a built-in preset image gallery. Document Solutions v9.0 brings smarter automation, better performance, and greater flexibility to your applications.

Explore What’s New in Each Document API Library Below:

Download the Latest Document Solutions Releases Today!


Document Solutions for PDF (DsPdf)

New Document Optimization API (Optimize)

The v9.0 release introduces a highly requested enhancement for PDF size reduction and cleanup: a new, unified Optimize() method on the GcPdfDocument class. This API brings together several existing optimization capabilities, such as image deduplication, font handling, stream compression, and object stream usage, into a single, customizable entry point. Developers can now compress and streamline PDFs with one call, significantly improving workflow efficiency and output file size.

Why a Unified Optimize Method?

DsPdf has long included multiple APIs for reducing document size, but developers often needed to combine them manually depending on the scenario. The new optimization pipeline simplifies this process by:

  • Consolidating compression and cleanup operations
  • Providing a single OptimizeDocumentOptions object to configure behaviors
  • Ensuring that optimization and saving happen together (required for options like PdfStreamHandling)
  • Making it easier to script automated processing and bulk PDF optimization workflows

This makes the new Optimize() method ideal for applications involving archiving, uploading, client-side delivery, and server-side document pipelines.

Optimize a PDF in One Line

The DsPdf v9.0 API adds two new overloads:

public void Optimize(Stream stream, OptimizeDocumentOptions options)
public void Optimize(string fileName, OptimizeDocumentOptions options)

Each performs all configured optimizations and then saves the result, ensuring optimizations that affect PDF structure take effect only on save.

Highly Configurable Optimization Options

The new OptimizeDocumentOptions class gives full control over how aggressive or conservative the optimization should be. Developers can fine-tune:

Compression & Stream Behavior
  • CompressionLevel – Overrides the document’s default compression.
  • PdfStreamHandling – Controls how existing streams are rewritten (especially useful for previously loaded PDFs).
  • UseObjectStreams – Enables single or multiple object streams to reduce size significantly.
Font Optimization
  • OptimizeFontsOptions – Shrink embedded fonts and remove unused glyphs.
  • RemoveEmbeddedFonts – Strip all embedded fonts for maximum size reduction (use with caution, as appearance may change).
Image Optimization
  • RemoveDuplicateImages – Consolidates identical image streams to reduce file size.
Document Cleanup
  • DiscardEmbeddedPageThumbnails
  • DiscardOutlines
  • DiscardSubmitImportResetActions
  • DiscardJavaScriptActions
  • DiscardEmbeddedFiles
One-Click Maximum Compression

For scenarios where smallest size is the only priority, such as archival or bandwidth-restricted environments, the SetForMinimumSize() method enables every aggressive optimization, including those not recommended for general use.

Example: Reduce PDF Size While Keeping Content Sharp

var doc = new GcPdfDocument();
using var stream = new FileStream("test.pdf", FileMode.Open);
doc.Load(stream);

var options = new OptimizeDocumentOptions
{
    DiscardEmbeddedPageThumbnails = true
};

doc.Optimize("optimized.pdf", options);

With the new Optimize() method, DsPdf v9.0 makes high-quality, automated PDF optimization easier and more powerful than ever.

Help | Demo


Document Solutions for Word (DsWord)

Support for RD Fields in Document Field Updating

The v9.0 release expands DsWord’s field-processing engine with full support for the RD (Referenced Document) field, an important feature for customers working with large, multi-file Word projects such as legal filings, reports, academic materials, and publishing workflows.

The RD field allows a Word document to reference other DOCX files when building a Table of Contents (TOC), Table of Authorities (TOA), or Index, enabling authors to generate unified references across multiple documents. With v9.0, DsWord now automatically recognizes RD fields during field updates, retrieves referenced entries, and correctly merges headings, citations, and index entries into the parent document.

Why RD Field Support Matters

Many enterprise and legal Word documents are built using a master document with multiple sub-documents, each containing its own headings, citations, and index entries. The RD field makes it possible to:

  • Maintain long documents as smaller, manageable files
  • Generate a single consolidated TOC, TOA, or Index
  • Reference headings and entries across multiple files
  • Create dynamic documents that update automatically

With v9.0, DsWord brings this capability to automated workflows and server-side document generation.

Programmatically Generate a Consolidated TOC, TOA, or Index for a DOCX Document using C#

New RD Field API: RdFieldOptions

To support this workflow, DsWord adds the new RdFieldOptions class, which provides full access to RD field definitions:

public class RdFieldOptions : BaseFieldOptions, IFieldOptions
{
    public string FilePath { get; set; }
    public bool Relative { get; set; }
}

Developers can create, read, modify, or save RD fields from both SimpleField and ComplexField structures, allowing DsWord to integrate seamlessly into document assembly pipelines.

Document Path Awareness for Relative RD Fields

The v9.0 update also adds a new property to GcWordDocument:

public string Path { get; set; }

This property enables DsWord to resolve relative RD file paths when updating fields. It is automatically populated when loading or saving a document with a file path, but must be set manually when loading from a stream.

This enhancement ensures that headings, citations, and index terms can be gathered correctly across referenced documents.

Example: Consolidating TOC, TOA, and Index Entries Across Multiple Files

// Create referenced sub-documents...
// (each containing headings, authorities, and index entries)
// Create the main document
var doc = new GcWordDocument();
doc.Path = Path.Combine(Directory.GetCurrentDirectory(), @"rd-new.docx");
// Add TOC, TOA, and Index fields
var toc = new TocFieldOptions(doc);
doc.Body.AddParagraph("Table of Content", doc.Styles[BuiltInStyleId.Title])
        .AddComplexField(toc);
var toa = new ToaFieldOptions(doc);
doc.Body.AddParagraph("Table of Authorities", doc.Styles[BuiltInStyleId.Title])
        .AddComplexField(toa);
var index = new IndexFieldOptions(doc);
index.PageNumbers.Separator = "\t";
doc.Body.AddParagraph("Index", doc.Styles[BuiltInStyleId.Title])
        .AddComplexField(index);
// Reference the sub-documents using RD fields
for (int i = 1; i <= 2; i++)
{
    var rd = new RdFieldOptions(doc)
    {
        FilePath = $"sub{i}.docx",
        Relative = true
    };
    doc.Body.AddParagraph().AddComplexField(rd);
}
// Update all fields (TOC, TOA, Index + RD)
doc.UpdateFields();
doc.Save(doc.Path);

When UpdateFields() is called, DsWord now:

  • Loads each referenced sub-document
  • Extracts headings, citation entries, and index markers
  • Merges them into the parent document’s TOC, TOA, and Index
  • Produces a fully consolidated reference structure

With RD field support, DsWord v9.0 gives developers deeper control over complex Word document structures, making it easier to generate consolidated output and automate professional-grade document assembly workflows.

Help | Demo

Update DATE and TIME Fields with Word-Compatible Formatting

In v9.0, DsWord adds full support for updating DATE and TIME fields programmatically, including rich formatting options that closely follow Microsoft Word’s behavior. This enhancement makes it easy to insert “current date/time” fields into server-generated documents and keep them synchronized just by calling UpdateFields(), no manual edits required.

Whether you’re generating contracts, reports, letters, or timestamped exports, you can now control how dates and times are displayed across a wide range of languages and calendar systems.

Example of Updating DATE and TIME Fields with Word-Compatible Formatting

Rich Date/Time Formatting via Options Classes

To support flexible, Word-like formatting, DsWord introduces two new base classes:

  • TimeFormatOptions – Common options for formatting date/time strings
  • DateFormatOptions – Extends TimeFormatOptions with calendar-specific settings

These classes expose a DateTimeFormat string, which supports a broad set of format tokens similar to those used by Word (e.g., d, dd, MMM, MMMM, yyyy, hh:mm, AM/PM, localized era and calendar tokens, and more). This allows you to mimic the same formatting users see when inserting DATE/TIME fields in Word.

DateFormatOptions also lets you target specific calendar systems:

  • UseHijriLunarCalendar
  • UseSakaEraCalendar
  • UseUmAlQuoraCalendar

Together, these options give you fine-grained control over how dates and times are rendered across different regions and locales.

Note: Supported languages currently include:

"ar-SA", "bn-BD", "cs-CZ", "de-DE", "el-GR", "en-US", "es-ES", "fa-IR", "fr-FR", "he-IL", "hi-IN", "id-ID", "it-IT", "ja-JP", "ko-KR", "nl-NL", "pl-PL", "pt-PT", "ro-RO", "ru-RU", "sv-SE", "th-TH", "tr-TR", "uk-UA", "vi-VN", "zh-CN", "zh-HK", "zh-MO", "zh-SG", "zh-TW".

The numbered-item format is not supported in this release.

New Field Option Classes: TimeFieldOptions and DateFieldOptions

Building on the formatting base classes, DsWord v9.0 adds two field-specific types:

  • TimeFieldOptions – For TIME fields
    • A TIME field defines the current date and time, with emphasis on time formatting.
  • DateFieldOptions – For DATE fields
    • A DATE field also defines the current date and time, typically used for document headers, signatures, and print dates.
    • Includes UseLastCreatedFormat to honor the last date-time format used by the hosting application when inserting new DATE fields.

These classes are designed to integrate cleanly with existing DsWord field APIs, and they can be created from a GcWordDocument, SimpleField, or ComplexField, making them useful both for new documents and for updating existing ones.

Example: Insert and Update DATE and TIME Fields

The following example shows how to create default and custom-formatted fields and then update them to the current date and time:

GcWordDocument doc = new GcWordDocument();

// TIME field with default settings
var time = new TimeFieldOptions(doc);
doc.Body.AddParagraph("Time: ").AddComplexField(time);

// DATE field with default settings
var date = new DateFieldOptions(doc);
doc.Body.AddParagraph("Date: ").AddComplexField(date);

// DATE field with custom date-time format
date.DateTimeFormat = "'Today is ' d MMMM yyyy HH:mm:ss";
doc.Body.AddParagraph("Custom date-time format: ").AddComplexField(date);

// Update all fields to show the current date and time
doc.UpdateFields();
doc.Save("date-time.docx");

With this API, you can:

  • Insert DATE/TIME fields in templates and update them server-side
  • Localize date and time output based on document language
  • Match existing Word-based formatting conventions in automated workflows

DsWord v9.0 makes it significantly easier to keep dates and times accurate, consistent, and region-aware across all your generated Word documents.

Help | Demo


Document Solutions for Excel, .NET and Java Editions (DsExcel)

  1. Performance Improvements
  2. AI Functions: QUERY, TRANSLATE, TEXTSENTIMENT
  3. New Functions: VALUETOTEXT and ARRAYTOTEXT
  4. Control Shared Formula Export in XLSX Files
  5. Preserve “Show Hidden Rows and Columns” for SpreadJS ReportSheet
  6. Lossless Preservation of Excel Power Query Tables

Document Solutions Image Viewer (DsImageViewer)

New Horizontal & Vertical Skew Transforms for Images

In v9.0, the Document Solutions Image Viewer adds more flexibility to the recently introduced Object Tools feature by supporting skew transformations for inserted images. This enhancement allows users to apply perspective-style distortion by adjusting an image along the X or Y axis—providing more creative control for annotations, markups, or custom visual layouts within the viewer.

New Horizontal & Vertical Skew Transforms for Images

To support the new skew operations, v9.0 introduces two new configurable properties within the Image Properties panel:

  • Horizontal Skew
  • Vertical Skew

These values allow users to precisely control how an image is sheared along each axis. The skew options are integrated seamlessly into the existing properties UI, appearing alongside rotation, size, opacity, border controls, and other image settings.

Allow End-Users to Apply Horizontal and Vertical Skew in JS Image Editor

This is especially valuable for workflows involving technical diagrams, photographed documents, UI mockups, or any scenario where users need to visually align or tilt images without leaving the browser.

Help

New Built-In Image Gallery for Instant Image Insertion

In v9.0, DsImageViewer significantly expands the capabilities of the Object Tools feature by introducing a predefined Image Gallery directly accessible from the toolbar. This enhancement allows users to insert common icons, symbols, and graphic elements instantly, without preloading resources, hosting additional files, or writing custom loading logic.

JavaScript Image Viewer UI - Open Pre-Defined Image Gallery Option

The new gallery makes it easier than ever to annotate images, add checkmarks or arrows, place UI elements, or create consistent visual markups in the browser.

Instant Access from the Object Tools Toolbar

When the PaintToolsPlugin secondary toolbar is open, users will now see a new button:

“Open image gallery”

Clicking this button opens a drop-down panel containing a collection of predefined images organized into visual tiles.

JavaScript Image Viewer/Editor's Open Image Gallery Drop Down ExampleFrom here:

  • Selecting an image immediately closes the dropdown
  • The viewer enters placement mode, allowing the user to draw or click the area where the new image should appear
  • After placement, the inserted image behaves identically to any other Image object—supporting full resizing, rotation, skewing (new in v9.0), styling, and property adjustments
  • This provides a fast, intuitive way to work with commonly used images, especially in annotation-heavy workflows such as document review, QA processes, technical markups, and training materials.
Flexible Configuration Through the Image Gallery API

To support customizable image libraries, v9.0 expands the PaintToolsPluginOptions type with a new imageGallery property. Developers can provide a simple list of image URLs or define a richly structured gallery with categories, labels, display preferences, and metadata.

type PaintToolsPluginOptions = {
  imageGallery?: string[] | ImageGalleryConfig;
}
ImageGalleryConfig Features Include:
  • Categories for organizing multiple groups of images
  • Default width/height for inserted preset images
  • Aspect-ratio controls when resizing
  • Optional tags, labels, and descriptions for enhanced UX
  • Per-image size rules, if desired
  • Icon support for categories

This ensures the gallery can scale from small checkmark/arrow sets to full icon libraries or branded image collections.

Example: Defining a Multi-Category Gallery
viewer.addPlugin(new PaintToolsPlugin({
  imageGallery: {
    categories: [
      {
        name: "Annotations",
        items: [
          { 
            url: 'images/checkmark.png',
            label: 'Checkmark',
            width: 32,
            height: 32
          },
          {
            url: 'images/cross.png',
            label: 'Cross mark',
            width: 32,
            height: 32
          }
        ]
      },
      {
        name: "Arrows",
        items: [
          { url: 'images/arrow-up.png', label: 'Up arrow' },
          { url: 'images/arrow-down.png', label: 'Down arrow' }
        ]
      }
    ]
  }
}));

With this configuration:

  • Users instantly see categories like “Annotations” and “Arrows”
  • No pre-fetching or preloading logic is required
  • Selecting an image immediately transitions to placement mode
  • Inserted images remain fully editable through existing object properties

By reducing the friction of loading and placing images, DsImageViewer v9.0 delivers a faster, cleaner, and more user-friendly experience for anyone working with visual content in the browser.

Help | Demo

Ready to check out the release? Download Document Solutions Today!

comments powered by Disqus