GroupDocs.Signature for .NET 17.2.0 Release Notes

Major Features

There are about 30 improvements, new features and fixes in this regular release. The most notable are:

  • Introduced alternative Text Signature Sticker implementation for Pdf Document
  • Introduced Text Signature Adjustments for all supported document formats
  • Introduced Rotation options for Text Signature for all supported Document types
  • Improved Alignment algorithms for Text and Image Signature formats
  • Introduced Rotation options for Image Signature for all supported Document types
  • Improved Image Signature Size Adjustment for all Document Types
  • Improved Opacity Implementation for Text Signature for Pdf Documents
  • Involved Dynabic Metered features
  • Improved validation layer

Full List of Issues Covering all Changes in this Release

KeySummaryIssue Type
SIGNATURENET-2605Implement Text Signature Size Adjustments for SlidesNew Feature
SIGNATURENET-2603Implement Text Signature Size Adjustments for WordsNew Feature
SIGNATURENET-2601Implement Text Signature Size Adjustments for CellsNew Feature
SIGNATURENET-2598Implement Text Signature Size Adjustments for PDFNew Feature
SIGNATURENET-2593Implement extended properties for Text Stamp Implementation signature of Pdf DocumentsNew Feature
SIGNATURENET-2581Implement Text Signature Opacity for Words DocumentsNew Feature
SIGNATURENET-2579Implement Text Signature Opacity for Slides DocumentsNew Feature
SIGNATURENET-2569Implement verification for Pdf Text Sticker Annotation SignatureNew Feature
SIGNATURENET-2564Implement alternative Text Signature implementation as Sticker (TextAnnotation) for Pdf DocumentsNew Feature
SIGNATURENET-2217Implement Image Signature free angle rotation for SlidesNew Feature
SIGNATURENET-2215Implement Image Signature free angle rotation for WordsNew Feature
SIGNATURENET-2213Implement Image Signature free angle rotation for CellsNew Feature
SIGNATURENET-2211Implement Image Signature free angle rotation for PDFNew Feature
SIGNATURENET-2188Implement Image Signature Size Adjustments for CellsNew Feature
SIGNATURENET-2142Implement Image Signature rotation for SlidesNew Feature
SIGNATURENET-2140Implement Image Signature rotation for CellsNew Feature
SIGNATURENET-2138Implement Image Signature rotation for WordsNew Feature
SIGNATURENET-2136Implement Image Signature rotation for PDFNew Feature
SIGNATURENET-2126Implement Text Signature rotation for SlidesNew Feature
SIGNATURENET-2124Implement Text Signature rotation for CellsNew Feature
SIGNATURENET-2122Implement Text Signature rotation for WordsNew Feature
SIGNATURENET-2120Implement Text Signature rotation for PdfNew Feature
SIGNATURENET-2607Multiple signature options for Words Documents are intersecting in same Word NodeBug
SIGNATURENET-2589When processing Pdf document with Digital Signature in iterative mode document saved incorrectlyBug
SIGNATURENET-2571Apply lower case for output file extensionBug
SIGNATURENET-2556Fix background appearance of Text Annotation of Pdf Documents PagesBug
SIGNATURENET-2547Pdf Text Verification doesn’t get list of Annotations from Pdf DocumentBug

Public API and Backward Incompatible Changes

  • Added new public interfaces. IRectangle interface describes Signature Area with Left, Top, Width and Height. IAlignment interface describes Alignment and Margins of Signature Area. IRotation interface describes Rotation property of Signature Area. IOpacity interface describes opacity value for Signature appearance Existing Signature Options like SignTextOptions, SignImageOptions and SignDigitalOptions implement these interfaces.

  • Added new enumeration type for Pdf Signature Implementation - Sticker. For Pdf Sticker Implementation new class PdfTextStickerAppearance was added to describe additional properties of Sticker area appearance on page. Added new enumeration types PdfTextStickerIcon to describes available values for Pdf Text Sticker Icon Appearance and PdfTextStickerState to describe initial state of Sticker on page.

  • Updated public classes for Pdf Text Signature Verifications to verify Stamp, Sticker and TextAnnotation implementation separately.

    Verification of PDF Document signed with Text Signature Sticker

    string storagePath = @"c:\Aspose\Test\Storage";
    string outputPath = @"c:\Aspose\Test\Output";
    // setup Signature configuration
    SignatureConfig signConfig = new SignatureConfig
    {
        StoragePath = storagePath,
        OutputPath = outputPath
    };
    // instantiating the conversion handler
    SignatureHandler handler = new SignatureHandler(signConfig);
    // setup verification options
    PDFVerifyTextOptions verifyOptions = new PDFVerifyTextOptions();
    // specify verification type
    verifyOptions.SignatureImplementation = PdfTextSignatureImplementation.Sticker;
    // verify only page with specified number
    verifyOptions.DocumentPageNumber = 1;
    // verify all pages of a document if true
    verifyOptions.VerifyAllPages = true;
    //If verify option Text is set, it will be searched in Title, Subject and Contents
    verifyOptions.Text = "Contents";
    // create Verify Extensions
    PdfTextStickerVerifyExtensions extensions = new PdfTextStickerVerifyExtensions();
    //If verify option is set, then appropriate property of Sticker must be equals
    extensions.Contents = "Contents";
    extensions.Subject = "Subject";
    extensions.Title = "Title";
    extensions.Icon = PdfTextStickerIcon.Cross;
    // set extensions to verification options
    verifyOptions.Extensions = extensions;
    //verify document
    VerificationResult result = handler.Verify("test_text_sticker.pdf", verifyOptions);
    Assert.IsTrue(result.IsValid, "Verification fails");
    Console.WriteLine("Verification result is: " + result.IsValid);
    
  • Verification of PDF Document signed with Text Signature Annotation

    string storagePath = @"c:\Aspose\Test\Storage";
    string outputPath = @"c:\Aspose\Test\Output";
    // setup Signature configuration
    SignatureConfig signConfig = new SignatureConfig
    {
        StoragePath = storagePath,
        OutputPath = outputPath
    };
    // instantiating the conversion handler
    SignatureHandler handler = new SignatureHandler(signConfig);
    // setup verification options
    PDFVerifyTextOptions verifyOptions = new PDFVerifyTextOptions();
    // specify verification type
    verifyOptions.SignatureImplementation = PdfTextSignatureImplementation.Annotation;
    // verify only page with specified number
    verifyOptions.DocumentPageNumber = 1;
    // verify all pages of a document if true
    verifyOptions.VerifyAllPages = true;
    //If verify option Text is set, it will be searched in Title, Subject and Contents
    verifyOptions.Text = "John Smith_1";
    // create Verify Extensions
    PdfTextAnnotationVerifyExtensions extensions = new PdfTextAnnotationVerifyExtensions();
    //If verify option is set, then appropriate property of Annotation must be equals
    extensions.Contents = "John Smith_1";
    extensions.Subject = "John Smith_2";
    extensions.Title = "John Smith_3";
    // set extensions to verification options
    verifyOptions.Extensions = extensions;
    //verify document
    VerificationResult result = handler.Verify("test_text_annotation.pdf", verifyOptions);
    Assert.IsTrue(result.IsValid, "Verification fails");
    Console.WriteLine("Verification result is: " + result.IsValid);
    
  • Base class for Text Signature SignTextOptions was extended with Location and Size Adjustment features. New properties LocationMeasureType and SizeMeasureType describe ability to specify position of signature area in pixel or in percents per page size.

  • Sign Pdf Documents with Text Signature As Sticker

    Sign Pdf Documents with Text Signature As Sticker

    string storagePath = @"c:\Aspose\Test\Storage";
    string outputPath = @"c:\Aspose\Test\Output";
    // setup Signature configuration
    SignatureConfig signConfig = new SignatureConfig
    {
        StoragePath = storagePath,
        OutputPath = outputPath
    };
    // instantiating the conversion handler
    SignatureHandler handler = new SignatureHandler(signConfig);
    // setup signature options
    PdfSignTextOptions signOptions = new PdfSignTextOptions("John Smith");
    signOptions.Left = 10;
    signOptions.Top = 10;
    signOptions.HorizontalAlignment = HorizontalAlignment.Right;
    signOptions.VerticalAlignment = VerticalAlignment.Bottom;
    signOptions.Margin = new Padding(10);
    signOptions.BackgroundColor = Color.Red;
    signOptions.Opacity = 0.5;
    //type of implementation
    signOptions.SignatureImplementation = PdfTextSignatureImplementation.Sticker;
    // an appearance customizes more specific options
    PdfTextStickerAppearance appearance = new PdfTextStickerAppearance();
    signOptions.Appearance = appearance;
    // text content of an sticker
    appearance.Title = "Title";
    appearance.Subject = "Subject";
    appearance.Contents = "Contents";
    // is sticker opened by default
    appearance.Opened = false;
    // an icon of a sticker on a page
    appearance.Icon = PdfTextStickerIcon.Star;
    //If custom appearance is not set there will be used DefaultAppearance
    //User can change any parameter of DefaultAppearance
    //PdfTextStickerAppearance.DefaultAppearance.Title = "Title";
    //PdfTextStickerAppearance.DefaultAppearance.Subject = "Subject";
    //PdfTextStickerAppearance.DefaultAppearance.Contents = "Contents";
    //PdfTextStickerAppearance.DefaultAppearance.Opened = false;
    //PdfTextStickerAppearance.DefaultAppearance.State = PdfTextStickerState.Completed;
    //PdfTextStickerAppearance.DefaultAppearance.Icon = PdfTextStickerIcon.Note;
    // sign document
    string signedPath = handler.Sign<string>("test.pdf", signOptions,
        new SaveOptions { OutputType = OutputType.String, OutputFileName = "Pdf_TextSignatureAsSticker" });
    Console.WriteLine("Signed file path is: " + signedPath);
    
  • Add Rotation to Text Signature appearance

    Add Rotation to Text Signature appearance

    string storagePath = @"c:\Aspose\Test\Storage";
    string outputPath = @"c:\Aspose\Test\Output";
    // setup Signature configuration
    SignatureConfig signConfig = new SignatureConfig
    {
        StoragePath = storagePath,
        OutputPath = outputPath
    };
    // instantiating the conversion handler
    SignatureHandler handler = new SignatureHandler(signConfig);
    // setup appearance options
    PdfSignTextOptions signOptions = new PdfSignTextOptions("John Smith");
    signOptions.Font.FontSize = 32;
    signOptions.BackgroundColor = Color.BlueViolet;
    signOptions.ForeColor = Color.Orange;
    signOptions.Left = 200;
    signOptions.Top = 200;
    // setup rotation
    signOptions.RotationAngle = 48;
    // sign document
    string signedPath = handler.Sign<string>("test.pdf", signOptions,
        new SaveOptions { OutputType = OutputType.String, OutputFileName = "Pdf_Text_Rotation" });
    Console.WriteLine("Signed file path is: " + signedPath);
    
  • Add Transparency and Rotation to Text Signature appearance

    Add Transparency and Rotation to Text Signature appearance for Slides

    string storagePath = @"c:\Aspose\Test\Storage";
    string outputPath = @"c:\Aspose\Test\Output";
    // setup Signature configuration
    SignatureConfig signConfig = new SignatureConfig
    {
        StoragePath = storagePath,
        OutputPath = outputPath
    };
    // instantiating the conversion handler
    SignatureHandler handler = new SignatureHandler(signConfig);
    // setup appearance options
    SlidesSignTextOptions signOptions = new SlidesSignTextOptions("John Smith");
    signOptions.Left = 100;
    signOptions.Top = 100;
    signOptions.Width = 200;
    signOptions.Height = 200;
    signOptions.ForeColor = Color.Orange;
    signOptions.BackgroundColor = Color.BlueViolet;
    signOptions.BorderColor = Color.Orange;
    signOptions.BorderWeight = 5;
    // setup rotation
    signOptions.RotationAngle = 48;
    // setup transparency
    signOptions.BackgroundTransparency = 0.4;
    signOptions.BorderTransparency = 0.8;
    // sign document
    string signedPath = handler.Sign<string>("test.ppt", signOptions,
        new SaveOptions { OutputType = OutputType.String, OutputFileName = "Slides_Text_Transparency_Rotation" });
    Console.WriteLine("Signed file path is: " + signedPath);
    
  • Add Rotation to Image Signature appearance

    Add Rotation to Image Signature appearance

    string storagePath = @"c:\Aspose\Test\Storage";
    string outputPath = @"c:\Aspose\Test\Output";
    string imagePath = @"c:\Aspose\Test\Images";
    // setup Signature configuration
    SignatureConfig signConfig = new SignatureConfig
    {
        StoragePath = storagePath,
        ImagesPath = imagePath,
        OutputPath = outputPath
    };
    // instantiating the conversion handler
    SignatureHandler handler = new SignatureHandler(signConfig);
    //setup size and position
    PdfSignImageOptions signOptions = new PdfSignImageOptions("signature.jpg");
    signOptions.Left = 100;
    signOptions.Top = 100;
    signOptions.Width = 200;
    signOptions.Height = 200;
    // setup rotation
    signOptions.RotationAngle = 48;
    // sign document
    string signedPath = handler.Sign<string>("test.pdf", signOptions,
        new SaveOptions { OutputType = OutputType.String, OutputFileName = "Pdf_Image_Rotation" });
    Console.WriteLine("Signed file path is: " + signedPath);