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!
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.
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.
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.
Visit Demo
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.
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
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:
In GcPdfViewer, Annotation Editor's default toolbar layout now contains a new toolbar button, "Signature tool."
The new tool will allow you to:
Draw, type, or add image signature on PDF documents in Web
Draw, type, or add an image signature at any location on your document.
Add Font and Forecolor of your choice to your signature with in-built Font/Forecolor properties.
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.
You can set or modify additional properties of the signature by accessing the signature (Stamp Annotation) from the property panel.
Use the showSignTool method to display the "Add signature" dialog from code:
viewer.toolbarLayout.viewer.default.splice(1, 0, 'edit-sign-tool');
viewer.applyToolbarLayout();
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
});
}
or set options in the signTool property:
var viewer = new GcPdfViewer("#host", {
signTool: { selectedTab: 'Type' }
});
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.
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.
You can now add links to your PDF document through the new Link Annotation option available in the Toolbar.
The following features are supported:
View specific examples from above in the below resources.
With this release, we enable customization of different parts of GcPdfViewer, as per your business needs. You can customize the following areas:
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.
Visit Demo
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.
Visit Help
Generating Excel reports from Templates is faster than before! The main highlights in this release are:
Excel Reports with 100,000 records would now be generated in seconds!
Check out the full release: What's New in GrapeCity Documents for Excel v4.1.
Several scenarios are now improved when applying copy and move range operations in Word documents:
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
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
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
Visit Help
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
Methods were added in ImageData class
Visit Help