Document Solutions .NET Bundle 7.1.0

Released: Apr 17, 2024

Actualizaciones en 7.1.0

Características

Document Solutions for Excel

  • Template Enhancements
    • Enhanced Template language with better performance - The DsExcel Templates have been refactored, emphasizing enhanced performance and stability. The recent improvements include:
      • Addressing the absence of a data source by treating it as null.
      • Enabling OverwriteFillFormat functionality to seamlessly operate in both Pagination and non-Pagination modes.
      • Enhancing template processing capabilities to include support for Picture and Shapes.
      • Enhanced Template performance when processing templates with merged cells.
      • Ensuring the seamless continuation of features from the old template design without introducing any breaking changes.
    • Custom sort order and multi-column sorting - DsExcel Templates have long supported the sorting of template data using syntax to define the sort direction in template cells. Nevertheless, there is a practical need to sort cells based on the values of other cells and additionally incorporate the capability to sort data using multiple cell values. In response to this need, DsExcel broadens the syntax by enabling the inclusion of multiple sort conditions simultaneously rather than executing the template multiple times with different sort conditions. Supported scenarios include:
      • Sort a column based on the ascending/descending order of other column.
      • Sort a column based on the ascending/descending order of the other column and further on the ascending/descending order of the third column.
      • Sort a column based on a specified sequence of data.
    • Support for interrupting the execution of the ProcessTemplate method - In instances where the execution of the processTemplate method extends for a prolonged period due to a large volume of data or without a clear understanding of the underlying cause, there is a delay in showcasing the populated data. DsExcel now supports interrupting the processTemplate method by calling Workbook.ProcessTemplate(CancellationToken) overload that accepts CancellationToken as a parameter.
      • There are three ways in which you can interrupt the template processing:
        • Use CancellationTokenSource.Cancel to request for cancellation immediately.
        • Use CancellationTokenSource.CancelAfter to request for cancellation after the specified delay time.
        • Use CancellationTokenSource.Dispose to release resources.
      • The Workbook.ProcessTemplate method will throw an OperationCanceledException under the following conditions:
        • The CancellationTokenSource associated with CancellationToken has initiated a cancellation request.
        • The internal data structures of Workbook.ProcessTemplate remain in a consistent state, ensuring the workbook object's safe use when handling the cancellation request.
        • Workbook.ProcessTemplate is actively engaged in its processing tasks.
      • In the event of an exception, the caller is responsible for deciding whether to accept the partially expanded template or revert to the previous state. If the decision is to revert, the caller must serialize the workbook before invoking the Workbook.ProcessTemplate method, subsequently deserializing the workbook after canceling the operation.
  • CalculationMode Options - Introduced the Workbook.Options.Formulas.CalculationMode property. This property allow you to set one of the calculation mode enums on the worksheet, providing control over formula calculation when the worksheet is opened.
    • The property supports the following enums:
      • Automatic: Executes all calculations.
      • Semiautomatic: Performs calculations for everything except Data Tables and Python formulas.
      • Manual: Does not perform any calculations.
    • The property is supported during Excel I/O, SpreadJS I/O, and SSJSON I/O.
  • Support Table Reference in Cross Workbook Formulas - In large and complex Excel files, it is typical for formulas to incorporate references to data in other workbooks, whether internal or external. The conventional method of manually opening external workbooks, copying data, and integrating it into the Excel file is unnecessary. Instead, a more efficient approach involves directly referencing the data in the external workbook. In this release, DsExcel supports referencing external workbooks with the Table formula.
  • Ignore Errors in Range - To empower users to bypass errors and prevent the display of the green triangle at the top-left corner of a cell in Excel, DsExcel has introduced the IgnoredError property within the IRange interface. This property, coupled with the IgnoredErrorType enumeration, allows users to dismiss errors like invalid formula results, numbers stored as text, inconsistent formulas in adjacent cells, and more, selectively within a specific cell range in Excel.
  • Export Barcodes as Pictures in Excel Files - It is now feasible to preserve Excel files containing barcodes generated from SpreadJS or DsExcel. DsExcel has added the Workbook.ConvertBarcodeToPicture(ImageType) method, enabling the conversion of barcodes to images across all worksheets for seamless storage in Excel files, eliminating the occurrence of '#Ref' values. In cases where no ImageType parameter is explicitly specified, the default is set to the SVG image type.
  • Search Cells with Tags - DsExcel has been supporting the Tag property, which functions exclusively with SpreadJS. This property can be affixed to cells, rows, columns, or sheets containing specific types of data, along with options and suggestions pertaining to that data. Additionally, you can import/export a tag with uncomplicated data using SSJSON. In this release, DsExcel has introduced the SpecialCellType.Tags and IRange.SpecialCells(SpecialCellType.Tags) overload, facilitating the identification of cells with tags within a designated range.
  • SpreadJS Compatibility Features - DsExcel integrates additional SpreadJS features, improving compatibility with the client-side SpreadJS product. It's essential to highlight that these new features function exclusively with SpreadJS and are incompatible with Microsoft Excel.
    • Get and set cell background images.
    • Support lossless .sjs/ssjson I/O of GanttSheet.
    • Support lossless .sjs/ssjson I/O of ReportSheet.

Document Solutions for Imaging

  • Draw Rotated Text within Unrotated Rectangular Bounds - Drawing rotated text within unrotated rectangular bounds offers several advantages, such as allowing better space utilization, consistency in layout, efficiency with responsive designs without major disruptions to the design, and more. Support has been added for drawing rotated text within unrotated rectangular bounds. Users can now employ the DrawRotatedText and MeasureRotatedText methods within the GcGraphics class to draw rotated text within unrotated rectangular bounds, similar to how Microsoft Excel draws rotated text inside borderless cells.
    • DrawRotatedText facilitates the drawing of text at an angle within a specified rectangle, while MeasureRotatedText calculates the bounds for accurate text placement.
    • Enabled users to set the alignment of the rotated text using RotatedTextAlignment enumeration, which is used as one of the parameters in the above methods. These new methods are applicable to all classes derived from GcGraphics, including those involved in drawing to PDF, SVG, and bitmaps.
  • Drawing Text in Slanted Rectangles - Text can now be rotated within slanted rectangles, similar to how Microsoft Excel draws rotated text in cells with borders. To achieve this layout, a special DrawSlantedText method has been added, which is very similar to the DrawRotatedText method except for the last parameter of the SlantedTextAlignment type that specifies the alignment of slanted text within the target rectangle. There are six modes for this enum type: BelowRotatedInside, BelowRotatedOutside, AboveRotatedInside, AboveRotatedOutside, CenterInsideOutside, and CenterOutsideInside.

Document Solutions Image Viewer

  • Save an Image in JavaScript Image Viewer to Different Format - Users can now transform images into alternative formats in DsImageViewer, ensuring compatibility across various devices, platforms, and applications. The enhanced "Save" button now includes the "Save As" feature, presenting a convenient "Save As" dropdown menu, which will be available by default in the Viewer. This dropdown menu enables users to effortlessly convert and save images in alternative formats, enhancing the overall user experience.
    • The save method allows users to programmatically save images in various formats using the convertToFormat option. The supported image formats for conversion include PNG, JPEG, WEBP, BMP, and GIF (image/png, image/jpeg, image/webp, image/bmp, image/gif).
    • Users can also now utilize the saveButton option to customize the behavior and appearance of the save button or to enable or disable the Save button drop-down menu. The following code restricts "Save As" Image Formats to PNG and BMP.

Document Solutions for PDF

  • Add Rich Media to PDF Documents - Enhance your PDF documents by seamlessly incorporating rich media elements such as audio and video. With the addition of rich media, you can elevate user engagement and create dynamic, interactive content within your PDFs. Incorporate multimedia support programmatically into your PDF documents using the new RichMediaAnnotation class. Here are the key capabilities of the class:
    • Embed Multimedia Content: RichMedia annotations enable incorporating multimedia assets, including audio, video, and animations, into PDF files. This can enhance presentations, educational materials, or interactive forms.
    • Annotation Properties: RichMedia annotations have properties that define how the multimedia content should be presented. These properties may include the activation conditions, visibility settings, and the appearance of the annotation.
    • Activation and Deactivation: Activation conditions determine when the multimedia content should start or stop playing. For example, you can set the content to play when the user clicks the annotation or when the page containing the clip becomes visible.
    • Presentation Style: RichMedia annotations support two types of presentation styles - Embedded and Windowed.
    • Control Navigation: RichMedia annotations allow you to control the settings of navigation options to True or False.
  • Optimize PDF File Size - You can now optimize the PDF file by using new API that helps eliminate redundant instances of identical images internally within the document. It will now also be possible to optimize the PDF File size of a merged PDF document. The following new API has been introduced:
    • New GcPdfDocument.RemoveDuplicateImages() method to remove instances of identical images internally.
    • MergeDocumentOptions.RemoveDuplicateImages boolean property which if 'true', calls RemoveDuplicateImages() method internally.
  • Draw Rotated Text within Unrotated Rectangular Bounds - Drawing rotated text within unrotated rectangular bounds offers several advantages, such as allowing better space utilization, consistency in layout, efficiency with responsive designs without major disruptions to the design, and more. Support has been added for drawing rotated text within unrotated rectangular bounds. Users can now employ the DrawRotatedText and MeasureRotatedText methods within the GcGraphics class to draw rotated text within unrotated rectangular bounds, similar to how Microsoft Excel draws rotated text inside borderless cells.
    • DrawRotatedText facilitates the drawing of text at an angle within a specified rectangle, while MeasureRotatedText calculates the bounds for accurate text placement.
    • Enabled users to set the alignment of the rotated text using RotatedTextAlignment enumeration, which is used as one of the parameters in the above methods. These new methods are applicable to all classes derived from GcGraphics, including those involved in drawing to PDF, SVG, and bitmaps.
  • Drawing Text in Slanted Rectangles - Text can now be rotated within slanted rectangles, similar to how Microsoft Excel draws rotated text in cells with borders. To achieve this layout, a special DrawSlantedText method has been added, which is very similar to the DrawRotatedText method except for the last parameter of the SlantedTextAlignment type that specifies the alignment of slanted text within the target rectangle. There are six modes for this enum type: BelowRotatedInside, BelowRotatedOutside, AboveRotatedInside, AboveRotatedOutside, CenterInsideOutside, and CenterOutsideInside.

Document Solutions PDF Viewer

  • Select Text and Add Comments - DsPdfViewer has enhanced the comment functionality to align with a user-friendly approach to adding comments. The new "Add comment" option in the context menu will help users select any text and add comments to the selection. The Reply Tool now activates automatically when a markup annotation or text comment is added via the context menu, focusing on the new comment in the list. This approach facilitates quick collaboration, feedback collection, and effective communication among multiple users, thereby contributing to a more efficient user interface for reviewing documents. Additional enhancements to the Reply Tool include:
    • Temporary highlighting of a selected annotation on the PDF page is now featured when the annotation is chosen in the comments list within the Reply Tool.
    • Users can now delete a comment item using the Delete key and navigate through comment items using the TAB and Arrow keys.
    • The functionality to resize the right sidebar element has been incorporated.
    • The color has been removed from Reply Tool icons, resulting in improved annotation icons.
    • An additional option, 'showContextMenuOnSelection,' has been added to programmatically control the context menu behavior when text is selected. The option has the following values:
      • "Auto": Automatically determines whether to show the context menu based on the device type.
      • "On": Always shows the context menu when text is selected.
      • "Off": Never shows the context menu when text is selected.
      • The default value is "Auto".
  • Work with Rich Media Annotations (audio/video) in PDF Documents
    • DsPdfViewer now facilitates the playback of embedded media resources, such as audio and video, providing users with a more immersive experience and direct interaction with multimedia content embedded within PDF documents. This enhancement is achieved by integrating multimedia support through rich media annotations, aligning with the PDF specification.
    • In this release, the Annotation editor and Quick edit toolbar under 'Attachments and stamps' now feature a newly added toolbar button labeled "Add rich media". This button helps to add media files (audio/video) to the PDF document. Just click on the "Add rich media" button and browse for the media file you want to add to the PDF document, which will be embedded in the PDF document.
    • You can also remove the media files or modify their properties within the viewer. The property panel allows editing various RichMedia annotation properties, including Media, Poster, Activation/Deactivation, Presentation Style, and Controls (navigation) settings. You can also download the Media and Poster files from the properties panel.
    • The PDF Viewer has extended this support to various video formats, including MP4, SWF, FLV, and WebM, while also covering audio formats such as MP3, OGG, and WAV.

Document Solutions for Word

  • Add Online Video in Word Documents - Added the WebVideoProperties class, which empowers users to customize the video player's HTML content and define its dimensions. This facilitates the seamless integration of online videos into Word documents, enabling direct playback within the document for a richer multimedia experience. The class offers the SetUrl method with three overloads, allowing users to specify the video's input URL, title, height, and width. This method generates the appropriate EmbeddedHTML string internally, providing a convenient way for users to define these parameters that may be challenging to write directly.