What's New in Document Solutions v8.1
We are pleased to announce the latest Document Solutions v8.1 release! This release offers fresh additions to our APIs and a new significant feature to extract table data using the DsPdfViewer UI. Have a look at the details for each of the APIs below:
- Document Solutions for PDF (DsPdf)
- Document Solutions PDF Viewer (DsPdfViewer)
- Document Solutions for Excel (DsExcel)
- Document Solutions for Word (DsWord)
Ready to check out the release? Download Document Solutions Today!
Document Solutions for PDF (DsPdf)
New ActionSound Class
With the v8.1 release, DsPdf adds the ActionSound class. This class allows the PDF document to play a sound when triggered. This feature enables adding multimedia features to your PDF documents. The sound action is also supported in DsPdfViewer.
The following code snippet associates ActionSound with a button in a PDF document:
// Submit form button:
var btnSubmit = new PushButtonField();
btnSubmit.Widget.Rect = new RectangleF(ip.X + fldOffset, ip.Y, 72, fldHeight);
btnSubmit.Widget.ButtonAppearance.Caption = "Submit";
btnSubmit.Widget.Highlighting = HighlightingMode.Invert;
btnSubmit.Widget.Page = page;
// The URL for the submission:
btnSubmit.Widget.Activate = new ActionSubmitForm();
btnSubmit.Widget.Events.MouseDown = new ActionSound(SoundObject.FromFile("2025-03-10-184758_117243.wav"));
doc.AcroForm.Fields.Add(btnSubmit);
// Reset form button:
var btnReset = new PushButtonField();
btnReset.Widget.Rect = new RectangleF(ip.X + fldOffset + 72 * 1.5f, ip.Y, 72, fldHeight);
btnReset.Widget.ButtonAppearance.Caption = "Reset";
btnReset.Widget.Highlighting = HighlightingMode.Invert;
btnReset.Widget.Page = page;
btnReset.Widget.Events.MouseDown = new ActionSound(SoundObject.FromFile("2025-03-10-184913_166798.wav"));
btnReset.Widget.Activate = new ActionResetForm();
doc.AcroForm.Fields.Add(btnReset);
Document Solutions PDF Viewer (DsPdfViewer)
New Feature Support in DsPdfViewer/Wasm
In the v7.2 release, we introduced our advanced WebAssembly(Wasm)-based PDF Viewer, enhancing the document editing experience locally on the client side with the Document Solutions PDF Viewer (DsPdfViewer). This innovative solution is based on WebAssembly and delivers a fast, secure, and highly responsive PDF editing experience directly within your web browser. The Wasm-based PDF viewer is designed to meet the needs of modern users and offers seamless performance, cross-platform compatibility, and an array of advanced features.
DsPdfViewer users can enable PDF-editing features in the viewer without setting up a .NET server. When using the Wasm SupportApi option, everything is done directly in your browser. The DsPdfViewer/Wasm version is available with the Professional DsPdfViewer license.
In this release, we have added support for the following features in DsPdfViewer/Wasm:
- Redact (add/edit and apply redact annotations)
- Export to raster images
- Convert annotations to content
Check out our demos to view the above features running in DsPdfViewer/Wasm. Each feature mentioned includes a demo that runs under the DsPdfViewer/Wasm version.
Interactive Table Data Extraction
In the v8.1 release, the DsPdfViewer adds interactive table data extraction—a tool that allows you to select and extract (export to a file or copy to clipboard) tabular data from a PDF. This tool facilitates a workflow for selecting, previewing, and exporting table data in multiple formats, such as TSV, CSV, JSON, XLSX, XML, and HTML.
A new button labeled "Extract Table Data" has been added to the main toolbar.
Clicking the button opens a side panel with options for:
- Selecting a table region on the page
- Cancelling a selection
- Adjusting Row/Column spacing and height
- Resetting the options
- Copying the selection
- Previewing the data selected
- Downloading data as CSV, JSON, XLSX, XML, and HTML formats
The visual table-editing tool provides an intuitive interface for refining extracted table data from PDF content. After selecting an area within a PDF document, this tool displays the boundaries of the detected table, allowing you to accurately adjust and structure the table for improved data extraction.
The Table Extraction side panel also allows users to copy the extracted data to the clipboard for quick use.
Users can also display the Table Extraction side panel programmatically using the addTableExtractionPanel() method and expanding the panel.
const handle = viewer.addTableExtractionPanel();
viewer.expandPanel(handle);
Note: Table data extraction is a Professional feature of DsPdfViewer and requires the SupportApi service to operate.
Document Solutions for Excel (DsExcel)
Add Cell Addresses to Exported Tables in HTML
In the v8.1 release, DsExcel adds the CellAttributeOptions dictionary property in the HtmlSaveOptions class, allowing cell attributes to be set using the CellAttribute enumeration. The CellAttribute enumeration includes the Address option, which enables DsExcel to export worksheet cell elements with the address attribute in HTML. This helps to locate each cell element in the exported HTML file.
// Create a zip file stream
FileStream outputStream = new FileStream("SaveHtmlWithCellAttributes.zip", FileMode.Create);
// Create a new .NET XLSX workbook
var workbook = new GrapeCity.Documents.Excel.Workbook();
Stream fileStream = this.GetResourceStream("xlsx\\NetProfit.xlsx");
// Open the File XLSX Files Stream
workbook.Open(fileStream);
HtmlSaveOptions options = new HtmlSaveOptions();
// Use CellAttributeOptions to add the cell element's address attribute to the exported html file
options.CellAttributeOptions.Add(CellAttribute.Address, "address");
// Save the Workbook
workbook.Save(outputStream, options);
// Close the zip stream
outputStream.Close();
Help .NET | Demo .NET | Help Java | Demo Java
[DsExcel Java] Clone Workbook
DsExcel Java now supports cloning a workbook using the new Workbook.clone() method. The clone() method clones the current workbook and returns a new instance of it.
// Create a new workbook
Workbook workbook = new Workbook();
// Open an excel file
InputStream fileStream = this.getResourceStream("xlsx/BreakEven.xlsx");
workbook.open(fileStream);
// Clone the workbook
IWorkbook clone = workbook.clone();
// Changes made to the cloned workbook will not affect the original workbook.
clone.getWorksheets().get(0).delete();
// Save to an excel file
workbook.save("WorkbookClone.xlsx");
Performance Improvements for VLOOKUP and UNIQUE Functions
In the v8.1 release, the performance of VLOOKUP and UNIQUE Functions has been improved significantly compared to the v8 version. Check out the new performance numbers below and try it out for yourself with our demos.
Features for SpreadJS Compatibility
The following SpreadJS features are supported as lossless in SJS and SSJSON file format:
- Data charts
- Data charts in Report sheet
- Support for binding data manager table as a data source
- Support SpreadJS DataRange
Have a look at the SpreadJS-supported feature list in DsExcel .NET and Java.
Document Solutions for Word (DsWord)
Features to Update Fields
In the v8.0 release, DsWord added support for working with and updating Fields in Word documents. In the v8.1 release, we support the same with additional fields:
- INDEX Field: Creates an index, which is a list of terms or topics mentioned in a document.
- XE Field: Marks text for inclusion in an index.
These can be utilized via the UpdateFields and Update methods.
The UpdateFields method of the GcWordDocument and RangeBase classes enables users to update all fields in the document or all fields that support updating in the range. Meanwhile, the Update method of the ComplexField and SimpleField classes allows users to update the field results.
DsWord also supports strong-typed access to the options of the INDEX and XE field types to read and write arguments and switches using the IndexFieldOptions and XeFieldOptions classes. These strong-typed field types also support PDF export.
Refer to the following example code to add an INDEX field and specify its options:
for (int i = 0; i < NPARS; ++i)
{
var par = doc.Body.Paragraphs.Add();
var txt = Util.LoremIpsumPar();
var words = txt.Split([' ', ',', '.'], 2);
if (words.Length != 2)
throw new Exception("Unexpected");
var word = words[0];
var xe = new XeFieldOptions(doc);
xe.Entry.Content.Text = word;
par.AddComplexField(xe);
par.AddRun(txt);
}
// Add new section for the index:
doc.Body.Paragraphs.Last.AddSectionBreak();
var p = doc.Body.Paragraphs.Add(doc.Styles[BuiltInStyleId.Index1]);
// Set up INDEX field options:
var index = new IndexFieldOptions(doc);
// Two column layout:
index.Columns = 2;
// Use headings for index entries:
index.Heading = "A";
// Set any additional options as needed,
// then create the INDEX field with the specified options:
ComplexField field = p.AddComplexField(index);
// Update the index field with a specific culture:
field.Update(new GrapeCity.Documents.Word.Layout.WordLayoutSettings()
{ FontCollection = Util.FontCollection, Culture = CultureInfo.GetCultureInfo("en-US")
});
Ready to check out the release? Download Document Solutions Today!