Signing specific pages in the multipage document

Base signature optionsΒ SignOptionsΒ contains propertyΒ SignOptions.PagesSetupΒ which allows to set up specific page numbers.

This example shows how to sign specific pages in the multipage Tiff document through the PagesSetup.PageNumbers list of integer values.

using (var signature = new Signature("multipage.tiff"))
{
    var options = new QrCodeSignOptions("Patient #36363393. R: No-Issues")
    {
        // set signature position 
        Left = 10,
        Top = 10,
        // set signature rectangle
        Width = 200,
        Height = 200,
        //specify pages numbers which we want to sign
        PagesSetup = new PagesSetup()
        {
            PageNumbers = new List<int> { 1, 3 }
        }
    };

    // sign document to file
    SignResult signResult = signature.Sign(outputFilePath, options);
    Console.WriteLine($"\nDocument signed with {signResult.Succeeded.Count} signatures");
    Console.WriteLine("\nList of newly created signatures:");
    foreach (BaseSignature temp in signResult.Succeeded)
    {
        Console.WriteLine($"{temp.SignatureType} at page #{temp.PageNumber}: Id:{temp.SignatureId}.");
    }
}

More resources

GitHub Examples

You may easily run the code above and see the feature in action in ourΒ GitHub examples:

Free Online Apps

Along with the full-featured .NET library, we provide simple but powerful free online apps.

To sign PDF, Word, Excel, PowerPoint, and other documents you can use the online apps from the GroupDocs.Signature App Product Family.