Skip to main content Skip to footer

What's New in GrapeCity Documents v4.1

GrapeCity Documents (GcDocs) is excited to announce the v4.1 release. In this release, we focus on strengthening our existing feature set and performance metrics and providing full support of features requested and in much demand. We also introduce a new Signature Tool to sign PDF documents in online Javascript-based GrapeCity Documents PDF Viewer and more.

Check out the new improvements below!

GrapeCity Documents for PDF (GcPdf)

Extract Data from PDF Documents Using Structure Tags

In the last few releases, we focused on extracting data from PDF documents for further processing of data. Because accessibility standards require PDF files to be tagged, these tagged PDF files contain metadata describing the logical document structure and order of the different document elements (e.g., pictures, text blocks, columns, titles). This makes it easier for screen readers to extract text or graphics from PDF files and present the file content in the correct order.

ExactDatafromPDF

With the v4.1 release, we introduce the new GrapeCity.Documents.Pdf.Recognition.Structure.LogicalStructure class, which together with other types in the GrapeCity.Documents.Pdf.Recognition.Structure namespace allows the extraction of the whole logical structure of the PDF document, which can be parsed for the tags, gleaning data that needs to be extracted. View examples below to see how to extract data from Tagged PDF documents using GcPDF.

Visit Help | Demo

Support PDF Type 1 Fonts

Type 1 Fonts are widely used in PDF documents on desktop publishing software or used for printing purposes. In this release, we have added support for the proper rendering of PDFs using Adobe Type 1 Font Format. Also included are image files using Type 1 fonts, that are rendered correctly in PDF documents.

TypeOneFont

Visit Demo

Redact Polygonal Area

GcPdf's Redact tool is an efficient tool for redacting and completely removing data from PDF documents. Since content splits across different regions, there may be requirements to redact certain PDF areas, not only as a rectangular redaction but also as a polygonal redaction. You can now redact a polygonal area in the document. To do so, provide the points defining the polygon and the polygon fill mode in the new 'Add Polygon' method of the Redact Annotation.

PolygonalRedaction

private void AddPolygonToRedact(Page p, Color fillColor, PointF[] pts, FillMode fillMode = FillMode.Alternate)
{
     var redact = new RedactAnnotation()
     {
          Page = p,
          OverlayFillColor = fillColor
     };
     redact.AddPolygon(pts, fillMode);

}

Visit Demo

GrapeCity Documents PDF Viewer (GcPdfViewer)

Add Graphical Signatures to PDF Documents

Because of the huge demand from our customers, GrapeCity Documents is excited to release the new Signature tool, which helps you add Graphical signatures to PDF documents in the online PDF Viewer, wherever your clients are. Use the new Signature tool to sign the following kinds of documents in your business applications:

  • Legal Contracts
  • Budget Approval
  • Purchase Order
  • Financial transactions
  • Business Contracts
  • Object Key Results (OKR)
  • Key Performance Indicators (KPI)
  • Goals and milestones

In GcPdfViewer, Annotation Editor's default toolbar layout now contains a new toolbar button, "Signature tool."

SignatureTool

The new tool will allow you to:

  1. Draw, type, or add image signature on PDF documents in Web

    Draw, type, or add an image signature at any location on your document.

SignatureTool

  1. Set Signature properties

Add Font and Forecolor of your choice to your signature with in-built Font/Forecolor properties.

SignatureTool

  1. Save Signature

This option will save a specific signature to the active user (set the currentUserName) in the browser's local storage. This depends on the 'Save signature' property, specified in the dialog or programmatically, set saveSignature boolean property specified in showSignTool method. Next time you visit the dialog, you'll have the signature saved and can re-use it. The signature data is saved in the browser's local storage and is associated with the active user set through the currentUserName property, which is the active user.

SaveSignature

  1. Modify Signature Properties through Property panel

You can set or modify additional properties of the signature by accessing the signature (Stamp Annotation) from the property panel.

SignatureProperties

  1. Add Signature tool through code

Use the showSignTool method to display the "Add signature" dialog from code:

viewer.toolbarLayout.viewer.default.splice(1, 0, 'edit-sign-tool');
viewer.applyToolbarLayout();
  1. Customise Signature tool through code

You can customize the appearance and behavior of the Signature tool dialog box or target annotation. To customize the Signature tool, pass the settings to the showSignTool method.

async function loadPdfViewer(selector) {
    var viewer = new GcPdfViewer(selector, { userName: 'John', supportApi: 'api/pdf-viewer'});
    viewer.addDefaultPanels();
    await viewer.newDocument();
    viewer.showSignTool({ title: 'Please, sign.',
              selectedTab: 'Draw',
              hideTabs: true, hideToolbar: true, hideSaveSignature: true,
              saveSignature: false,
              penColor: 'red', penWidth: 4,
              location: 'Center',
              destinationScale: 1.2
            });
}

Sign

or set options in the signTool property:

var viewer = new GcPdfViewer("#host", {
   signTool: { selectedTab: 'Type' }
});

AddSignature

Visit Help | Demo

Add an Image in PDF Documents

Documents, such as PDF Forms, often need to upload Images to the Form, especially in applications like loans, jobs, Employee Details, or Banking PDF Forms. You can now add images on PDF Documents through the new Stamp Annotation tool. Just add a Stamp annotation, and it will prompt you with a Browse dialog to choose your images.

You can also drag/drop images from a local folder or remote URL.

AddImage

Visit Help | Demo

Improved support for touch devices

In the v4.1 release, we improved the support of working with GcPdfViewer on touch devices. This support includes editing PDF documents with annotations and form fields with touch and drawing support. Draw ink annotations, resize annotations/fields, add signatures to the document, fill forms with your finger, pen, or stylus (including Apple Pencil) on iPhone/iPad or any other touch-enabled device.

FormFillerMobile PDFinIpad

PDFinIpad

Visit Help | Demo

You can now add links to your PDF document through the new Link Annotation option available in the Toolbar.

AnnotationEditor

The following features are supported:

  • Add Link annotation over existing text, image, area in the PDF document
  • Set any of the Link annotation properties like- URL, Destination, Action, or a JS Action over the PDF document or other annotation
  • Add Link annotation over any other annotation or form field
  • Add Link annotation from toolbar or context menu

Link Annotation

View specific examples from above in the below resources.

Visit Help | Demo

UI Customizations

Override

With this release, we enable customization of different parts of GcPdfViewer, as per your business needs. You can customize the following areas:

  • Create a custom toolbar item with an SVG icon
  • Customize the sidebar
    • Toggle sidebar buttons visibility
    • Change sidebar buttons order and visibility
    • Create custom sidebar panel (using React Without JSX)
  • Change the viewer theme using CSS styles
  • Localize the viewer in any language

Visit Help | Demo

Ability to Lock Fields in Edit Mode

Often in PDF Forms, not all fields are relevant to all users. Therefore, you need a way to delineate which fields should be filled out by specific users. You can now control locking/unlocking of Form Fields in GcPdfViewer and control this behavior for specific users. Set the annotations locked property to true or false to lock/unlock fields.

LockFields

Visit Demo

Support Custom Validation of Text Fields

From version 4.1 onwards, you can use the validateForm method to validate an active form and get the validation result. Use the validator function to validate all fields in a form and check for specific values. If the inputs do not meet the requirements, a validation error is thrown, allowing the developer to catch the error and prompt the user to correct the information entered. The example below validates whether each field has a value 'YES' or 'NO' value and returns a validation error if some other value is used in the field.

textfield

Visit Help

GrapeCity Documents for Excel (GcExcel)

Generating Excel reports from Templates is faster than before! The main highlights in this release are:

  • Performance improvements in Excel Template processing
  • Parse formula string into a syntax tree
  • Ignore Formulas when saving Excel files
  • Support open action script on PdfSaveOptions
  • New overload method to load JSON
  • Improved Calculation Engine performance when setting values
  • More Features for SpreadJS Integration
    • Support for RangeTemplate cell type
    • Apply custom object on CheckboxList and RadioButtonList cell type
    • New ToJson and FromJSON methods to Workbook elements
    • Get/set custom object as cell value
    • View full list of supported features here

Excel Reports with 100,000 records would now be generated in seconds!

TemplatePerformance

Check out the full release: What's New in GrapeCity Documents for Excel v4.1.

GrapeCity Documents for Word (GcWord)

Improved Copy and Move Range Operations

Several scenarios are now improved when applying copy and move range operations in Word documents:

  • Filling images and line images can now be copied/moved for shapes, group shapes, ink shapes, canvases, and pictures
  • Styles will now be correctly copied and moved without creating additional styles

Some word documents contain malformed hyperlinks (links not meeting the hyperlink standards). GcWord now supports the opening and saving of Word documents with malformed URLs in hyperlinks.

GcWord's DefaultMalformedURIRewriter class implements the IMalformedUriRewriter interface and the GcWordDocument.MalformedUriRewriter property of that type can be used to implement a custom strategy for rewriting malformed URIs. The property encapsulates two delegates called on loading malformed URI events or saving any URI from the document. You can also define any custom rewriter implementation which overrides the delegates and rewrites malformed URI as defined in the custom implementation.

var doc = new GcWordDocument();
doc.Load(@"example_malformed_mailto.docx");
//attach default rewriter
doc.MalformedUriRewriter = new DefaultMalformedUriRewriter();

Visit Help

Added the Ability to Remove Empty Runs during Replace Operations

When replacing text in a GcWordDocument, by default, the replace operation does not remove empty runs. In some cases, it may be desirable to remove empty runs, so to control that, GcWord introduces FindReplaceOptions.RemoveEmptyRuns boolean property indicating whether the replace should remove empty runs or not.

Visit Help

Improved Content Object Collection Enumeration

Most GcWord API uses the concept of a 'Range' to work with Word content. A Range represents a collection of Word content objects. While enumerating over a range, the enumeration will contain objects the developer doesn't expect to see in some cases. For example, if a range is on a run and run (as any run) is a part of a paragraph, the run's range will include that paragraph object even though the run is only a small part of the whole paragraph. This behavior is consistent with the standard MS Word API. But in many cases, a different behavior may be desirable, namely to iterate over the MINIMUM collection of objects in the range. This can now be achieved via the new RangeBase.GetInnerCollection() method or via the new ContentObject.GetChildren() methods.

Visit Help

Added New overloads to add Images using .NET Image and GcImaging

You can now take advantage of both .NET Image and GcImaging classes to add images in Word documents. Check out the new overloads below:

  • Methods were added in PictureCollection class

    • Picture Add (Image image)
    • Picture Add (GcImage image)
    • Picture Insert (Image image, InsertLocation location)
    • Picture Insert (GcImage image, InsertLocation location)
  • Methods were added in ImageData class

    • void SetImage (Image image)
    • void SetImage (GcImage image)

Visit Help

See GrapeCity Documents in Action!

Download the latest version of GrapeCity Documents

Download Now!

Shilpa Sharma - Product Manager

Shilpa Sharma

Product Manager
comments powered by Disqus